You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Tom Cleghorn <tc...@cambridge.org> on 2014/05/16 16:13:55 UTC

http condition in 1.9.x

Is there an easy method of capturing the exact response when using the 
"http" condition? Given a task like this:

<fail message="HTTP error code returned">
  <condition>
    <not>
      <http url="fakehost"/>
    </not>
  </condition>
</fail>

...it'd be nice, in a project I'm working on at the moment, to be able to 
return more granular error messages than "boo, HTTP error!" and "yay, no 
HTTP error!", but it seems as if the actual response code is only visible 
with -d output.

Thanks!