Script.Util.HttpResponse

An object that contains information about an HTTP request. This object is returned by calling the send() method of the Script.Util.HttpGet and Script.Util.HttpRequest request handlers.

The Script.Util.HttpResponse object has the properties listed in this table.

PropertyTypeDescription
contentStringThe content body returned in the response.
contentTypeStringThe content type returned in the response.
encodingStringThe type of encoding returned in the response.
headersObjectAn object that contains the response headers returned in the response.
returnStatusNumberA value that indicates the status of the response. Possible values:
  • 0 - OK
  • 1 - Empty URL
  • 2 - Call failed
  • 3 - Call succeeded with empty content
statusCodeNumberThe HTTP status code that the request returned, such as 200 or 404.

This example shows how to reference the properties of a Script.Util.HttpResponse object returned by the Script.Util.HttpRequest() request handler.