Module: request

Methods

(inner) request(options, callbacknullable)

Make an HTTP request.

Parameters:
Name Type Attributes Description
options Object
Properties
Name Type Attributes Default Description
uri String
query Object <nullable>
body Object <nullable>
json Object <nullable>
form Object <nullable>
type String <nullable>

One of "json", "form", "text", or "binary".

agent String <nullable>

User agent string.

strictSSL Object <optional>
<nullable>
true

Whether to accept bad certs.

method Object <nullable>

HTTP method.

auth Object <nullable>
Properties
Name Type Attributes Description
username String <nullable>
password String <nullable>
expect String <nullable>

Type to expect (see options.type). Error will be returned if the response is not of this type.

limit Number <nullable>

Byte limit on response.

callback function <nullable>

Will return a stream if not present.

Source: