http Class
Methods for making HTTP requests.
Methods
get
(
Object
-
url -
config
Gets data from the given URL.
Parameters:
-
urlStringURL to post.
-
configObjectConfiguration for the request.
-
paramsObjectQuery arguments.
-
timeoutNumberTimeout in milliseconds.
-
headersObjectHTTP headers.
-
contentTypeObjectMIME type.
-
Returns:
Object:
Returns an object with the following properties: body - contains body of response,
status - itself an object containing properties code and description.
post
(
Object
-
url -
data -
config
Posts the given data to the given URL.
Parameters:
-
urlStringURL to post.
-
dataObjectData to be posted.
-
configObjectConfiguration for the request.
-
paramsObjectQuery arguments.
-
timeoutNumberTimeout in milliseconds.
-
headersObjectHTTP headers.
-
contentTypeObjectMIME type.
-
Returns:
Object:
Returns an object with the following properties: body - contains body of response,
status - itself an object containing properties code and description.
post
(
Object
-
url -
object -
config
Makes a JSON-based POST request to the given URL.
Parameters:
-
urlStringURL to request from.
-
objectObjectObject to send.
-
configObjectConfiguration for the request.
-
paramsObjectQuery arguments.
-
timeoutNumberTimeout in milliseconds.
-
headersObjectHTTP headers.
-
contentTypeObjectMIME type.
-
Returns:
Object:
Returns an object with the following properties: body - contains body of response,
status - itself an object containing properties code and description.
