Class: Request

$.net.http. Request

new Request()

Request class to be used with HTTP client

Extends

Members

body :$.web.Body|undefined

The body of the request. The value is undefined when there is no body. Only available on $.request.
Type:
Inherited From:

contentType :string

The content type of the entity
Type:
  • string
Inherited From:

cookies :$.web.TupelList

The cookies associated with the entity
Type:
Inherited From:

entities :$.web.EntityList

The sub-entities of the entity
Type:
Inherited From:

headers :$.web.TupelList

The headers of the entity
Type:
Inherited From:

<readonly> language :string

Language of the request in IETF (BCP 47) format. This property contains the language that is used for the request. Application code should rely on this property only. The value is a string in the format specified by the IETF (BCP 47) standard.

The value of the property is determined by checking the following sources in descending precedence:

Type:
  • string
Inherited From:

method :$.net.http

The HTTP method of the incoming HTTP request
Type:
Inherited From:

parameters :$.web.TupelList

The parameters of the entity
Type:
Inherited From:

<readonly> path :string

The URL path specified in the request
Type:
  • string
Example
http://myhost:1080/sap.hana.xs.exampleapp/path/to/requested/resource.xsjs
                                         ^                              ^
                                         |                              |
                                         ----    request URL path    ----

queryPath :string

The URL query path specified in the request
Type:
  • string
Inherited From:
Example
// http://myhost:8000/exampleapp/resource.xsjs/some/more/options?param=value
//                                             ^               ^
//                                             |               |
//                                             -- query path  --

Methods

setBody(body, index)

Sets the body of the entity; the method supports all elemental JavaScript types and ArrayBuffers.
Parameters:
Name Type Argument Description
body any | ArrayBuffer Can be any elemental JavaScript type or an ArrayBuffer
index Number <optional>
If the first argument is ResultSet, the number specifies the index of a Blob column
Inherited From:
Throws:
Throws an error if the parameters are invalid