Http_response
This tag is used to define the HTTP response sent back from an
Http_listener, if you don't use this tag then the
HTTP response is either 200 OK or 500 with some exception
message being sent as the response message to the client. Now
if you choose to use this tag you can define any HTTP code
(even something outside of the 1xx-5xx range, which could be
used by your application for identifying certain scenarios).
With this response you can also send back headers, cookies and
even an entity (which is a stream of data) to the HTTP client.
Children Tags
Required Attributes
status
The status code to set in the HTTP response.
Usage Examples
Example #1
<http_response message="Something is wrong" status="400">
<header name="result" value="false" />
</http_response>
Example #2
<http_response message="OK!" status="200">
<header name="header1" value="value1" />
<entity>${dtf.stream(random,1024,1234)}</entity>
</http_response>