Scandit.Http

Methods

(static) get(url: string, options?: object): Promise

Parameters:
Name Type Attributes Default Description
url string

Request url

options object <optional>
{}

Request options (see Scandit.Http.request)

Properties
Name Type Attributes Description
query object <optional>

Query parameters e.g. {'foo': 'bar'}

Returns:
Promise

Promise which is resolved to Scandit.Http.Response.

(static) post(url: string, options?: object): Promise

Parameters:
Name Type Attributes Default Description
url string

Request url

options object <optional>
{}

Request options (see Scandit.Http.request)

Properties
Name Type Attributes Description
body object <optional>

Request POST data

Returns:
Promise

Promise which is resolved to Scandit.Http.Response.

(static) request(options: object): Promise

Parameters:
Name Type Default Description
options object {}

Request options

Properties
Name Type Attributes Description
url string

Request url

method string

Method (e.g. delete).

body object <optional>

Payload (JSON object or string)

query object <optional>

Request query dictionary

headers object <optional>

Request headers dictionary

Returns:
Promise

Promise which is resolved to Scandit.Http.Response.

Type Definitions

Response

Properties:
Name Type Description
status integer
body string
headers object