Closed GoogleCodeExporter closed 8 years ago
Original comment by alex.she...@gmail.com
on 18 Aug 2011 at 12:55
Original comment by alex.she...@gmail.com
on 18 Aug 2011 at 12:55
Added an attribute to the root http task "statusProperty" which defines a
property to save the response status to. For example:
<target name="get">
<http url="http://www.google.com/asfaf" statusProperty="out.status" failOnUnexpected="false"/>
<echo message="Response Status: ${out.status}"/>
</target>
Will be available in the 1.1.3 release
Original comment by alex.she...@gmail.com
on 18 Aug 2011 at 1:11
Great!
Would it be possible to add outputProperty as well?
Original comment by anders.j...@gmail.com
on 18 Aug 2011 at 1:16
Whoops, missed that part.. need to redact 1.1.3 that I'm in the middle of
releasing
Original comment by alex.she...@gmail.com
on 18 Aug 2011 at 2:44
Added an attribute to the root http task "entityProperty" which defines a
property to save the response entity to. For example:
<target name="http-get">
<http url="http://www.google.com" entityProperty="ent"/>
<echo message="resp: ${ent}"/>
</target>
Original comment by alex.she...@gmail.com
on 18 Aug 2011 at 2:54
Great!
Would it be possible to add headerProperty as well? That way, one could save
the entire set of headers, from which one could extract values.
Our specific use case is to save the cookie value returned an initial response,
to be used in subsequent requests.
Original comment by aronrobe...@gmail.com
on 18 Aug 2011 at 6:48
I can, but i already did 1.1.3 this morning.. If you like, open up a new
enhancement issue and i'll do a quick 1.1.4 release
Original comment by alex.she...@gmail.com
on 18 Aug 2011 at 9:09
What would you expect this to look like? I wouldn't want to dump all headers
into a string, then formatting etc would have to be assumed
maybe something like
<http ...>
<saveHeader name="Cookie-X" property="my.prop"/>
</http>
Original comment by alex.she...@gmail.com
on 18 Aug 2011 at 9:11
Thanks, Alex!
Being able to save the value of any specific header to a property would be
terrific - far better than having to parse a monolithic string containing all
of the headers and their values.
How do you suggest handling values of headers, like Set-Cookie, that can appear
more than once in a response?
(Thanks as well, Anders, for your contributions - much appreciated!)
Original comment by aronrobe...@gmail.com
on 19 Aug 2011 at 5:48
[deleted comment]
See Issue 24 for a continuation of the discussion for saving header values
Original comment by alex.she...@gmail.com
on 19 Aug 2011 at 12:31
Original comment by alex.she...@gmail.com
on 19 Aug 2011 at 12:51
Original issue reported on code.google.com by
anders.j...@gmail.com
on 16 Aug 2011 at 11:20