Class

ReketRequest

ReketRequest(urlopt, options)

Class representing a Request.

Constructor

# new ReketRequest(urlopt, options)

Parameters:
Name Type Attributes Description
url string <optional>

Absolute or relative URL of the resource that is being requested.

options Object

The options of the request object to create. Refer to your client lib for available options. Some of the options are abstracted by this class to have something generic.

method string <optional>

HTTP method (e.g. 'GET', 'POST', etc).

headers Object <optional>

Map of strings representing HTTP headers to send to the server.

View Source request.js, line 1

Members

Object

# headers

Abstracted object representing HTTP headers to send to the server.

View Source request.js, line 25

string

# url

The url of the HTTP request.

View Source request.js, line 18

Methods

# addHeader(name, value)

Add a header to be send.

Parameters:
Name Type Description
name string

The name of the header to add

value string

The value of the header.

View Source request.js, line 43

this

# setData(requestData)

Set the data to be sent as the request message data.

Parameters:
Name Type Description
requestData object

The data to send in request message data.

View Source request.js, line 53

this

# setMethod(requestMethod)

Set the HTTP method used by the request.

Parameters:
Name Type Description
requestMethod string

The HTTP method (e.g. 'GET', 'POST', etc).

View Source request.js, line 63

this