com.softwareag.connectivity.httpclient
Event Response


An event representing the HTTP responses.

The payload of the response is held inside an AnyExtractor event for easy retrieval.
See Also:
com.apama.util.AnyExtractor - Use helper actions on the AnyExtractor event for extracting data.

Field summary
 stringmethod

The HTTP method used for the request.
 stringpath

The HTTP path URI used for the request.
 com.apama.util.AnyExtractorpayload

The response payload wrapped inside an AnyExtractor event for easy retrieval of the data.
 integerstatusCode

The HTTP response status code.
 stringstatusMessage

The HTTP response status message.
 com.softwareag.connectivity.httpclient.HttpOptionsoptions

Optional HTTP options to set headers, cookies and query parameters.
 
Action summary
 stringgetCookie(string name)

Return the value of the HTTP cookie with the specified name. This is equivalent to calling options.cookies[name].
 stringgetHeader(string name)

Return the value of the HTTP header with the specified name. This is equivalent to calling options.headers[name].
 booleanisSuccess()

Indicate whether the HTTP request was successful by checking for a 2xx status code.
 
Field detail

method

string method
The HTTP method used for the request.
See Also:
com.softwareag.connectivity.httpclient.RequestType

options

com.softwareag.connectivity.httpclient.HttpOptions options
Optional HTTP options to set headers, cookies and query parameters.

path

string path
The HTTP path URI used for the request.

payload

com.apama.util.AnyExtractor payload
The response payload wrapped inside an AnyExtractor event for easy retrieval of the data.

statusCode

integer statusCode
The HTTP response status code.

statusMessage

string statusMessage
The HTTP response status message.
Action detail

getCookie

string getCookie(string name)
Return the value of the HTTP cookie with the specified name. This is equivalent to calling options.cookies[name].
Parameters:
name - The name of the cookie.
Throws:
Throws IllegalArgumentException if the cookie does not exist.

getHeader

string getHeader(string name)
Return the value of the HTTP header with the specified name. This is equivalent to calling options.headers[name].
Parameters:
name - The name of the header.
Throws:
Throws IllegalArgumentException if the header does not exist.

isSuccess

boolean isSuccess()
Indicate whether the HTTP request was successful by checking for a 2xx status code.
Returns:
true if the HTTP request was sucessful.