http

Provides methods for working with HTTP(S)

delete

Performs HTTP DELETE

Parameters:

Name

Type

Description

url

String

URL.

headers

Object

optional HTTP headers.

get

Performs HTTP GET

Parameters:

Name

Type

Description

url

String

URL.

headers

Object

optional HTTP headers.

Returns:

Object - Either a parsed out JSON if Content-Type is application/json or a string.

getResponseHeaders

Returns response headers

Parameters:

Name

Type

Description

url

String

URL.

Returns:

Object - Response headers.

post

Performs HTTP POST

Parameters:

Name

Type

Description

url

String

URL.

data

Object

Data.

headers

Object

optional HTTP headers.

Returns:

Object - Either a parsed out JSON if Content-Type is application/json or a string.

put

Performs HTTP PUT

Parameters:

Name

Type

Description

url

String

URL.

data

Object

Data.

headers

Object

optional HTTP headers.

Returns:

Object - Either a parsed out JSON if Content-Type is application/json or a string.