Class: WebEntityResponse

$.web. WebEntityResponse

$.web.WebEntityResponse represents an HTTP response entity.

new WebEntityResponse()

Provides access to the entity's metadata and to the content (body) of the entity.
See:
  • $.web.WebEntityRequest represents the corresponding HTTP request entity.

Members

body :$.web.Body|undefined

The body of the response. The value is undefined when there is no body. Not available on $.response.
Type:

contentType :string

The content type of the entity
Type:
  • string

entities :$.web.EntityList

The sub-entities of the entity
Type:

headers :$.web.TupelList

The headers of the entity
Type:

Methods

setBody(body, index)

Sets the body of the entity; The method supports all elemental JavaScript types, ArrayBuffers, WebResponses and WebEntityResponses. When using WebResponse or WebEntityResponse as arguments, the headers identifying that the body is a WebResponse/WebEntityResponse (Content-Type: application/http, content-transfer-encoding: binary) are automatically added to the parent WebEntityResponse.
Parameters:
Name Type Argument Description
body any | ArrayBuffer | $.web.WebResponse | $.web.WebEntityResponse Can be any elemental JavaScript type, an ArrayBuffer, WebResponse or WebEntityResponse.
index Number <optional>
If the first argument is of type ResultSet, the number specifies the index of a Blob column.
See:
  • $.web.Body.asWebRequest for an example on reading WebRequest objects from multipart request body and writing WebResponse objects to multipart response body.
Throws:
Throws an error if the given parameters cannot be used as a body.