HTTPResponse interface represents the response to an HTTP request made with the HTTP Client.
request() is called and the callback is invoked, an HTTP response will be passed as the third argument to the callback.
Returns true if the request succeeded. If the request failed, see the
errorMessage property for the reason why.
The type of response. This string property will always be
SUCCEEDED for a successful response,
FAIL for a failed response, and
TEMP_FAIL for a response that failed in a way that may get better in future, but did not after several tries.
You should use the
successful property to test for success unless you really need to know this detail.
For a failed request, this string property gives a reason for the failure.
The HTTP status code of the response as a string. This may not be set, if no response could be obtained from the server at all.
The HTTP reason message of the response. This may not be set, if no response could be obtained from the server at all.
For a request that succeeded, the final URL that was requested, incorporating any query parameters added via
queryParameter(); and if the request was redirected, then this property reflects the URL that was redirected to.
function singleValueHeader(name, default)
Returns a single-valued HTTP header from the response.
default, if provided, is returned as a default if the header was not in the response.
This property contains the body of the response, if one was provided, as a
BinaryData object. The filename, content type, and charset will have been filled in from the HTTP response’s
Content-Disposition headers, if available.