http

Provides methods for working with HTTP(S)

Methods

get(url)→ {Object}

Performs HTTP GET
Parameters:
Name Type Description
url String URL.
Returns:
Object - Either a parsed out JSON if Content-Type is application/json or a string.

post(url, data)→ {Object}

Performs HTTP POST
Parameters:
Name Type Description
url String URL.
data Object Data.
Returns:
Object - Either a parsed out JSON if Content-Type is application/json or a string.

put(url, data)→ {Object}

Performs HTTP PUT
Parameters:
Name Type Description
url String URL.
data Object Data.
Returns:
Object - Either a parsed out JSON if Content-Type is application/json or a string.

delete(url)

Performs HTTP DELETE
Parameters:
Name Type Description
url String URL.