http Class
Methods for making HTTP requests.
Methods
get
(
Object
-
url
-
config
Gets data from the given URL.
Parameters:
-
url
StringURL to post.
-
config
ObjectConfiguration for the request.
-
params
ObjectQuery arguments.
-
timeout
NumberTimeout in milliseconds.
-
headers
ObjectHTTP headers.
-
contentType
ObjectMIME 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:
-
url
StringURL to post.
-
data
ObjectData to be posted.
-
config
ObjectConfiguration for the request.
-
params
ObjectQuery arguments.
-
timeout
NumberTimeout in milliseconds.
-
headers
ObjectHTTP headers.
-
contentType
ObjectMIME 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:
-
url
StringURL to request from.
-
object
ObjectObject to send.
-
config
ObjectConfiguration for the request.
-
params
ObjectQuery arguments.
-
timeout
NumberTimeout in milliseconds.
-
headers
ObjectHTTP headers.
-
contentType
ObjectMIME type.
-
Returns:
Object:
Returns an object with the following properties: body - contains body of response,
status - itself an object containing properties code and description.