Class: CloudApi

CloudApi

HttpRequest class
Serves API to make REST HTTP requests to Cloud Apizee Platform


new CloudApi()

Methods


<static> delete(endpoint, params, headers)

Send DELETE HTTP request to Apizee cloud platform

Parameters:
Name Type Description
endpoint String

URL Endpoint

params Object

Request parameters

headers Object

[Optional] Request headers

Returns:

json result in promise

Type
Promise.<object>

<static> get(endpoint, params, headers)

Send GET HTTP request to Apizee cloud platform

Parameters:
Name Type Description
endpoint String

URL Endpoint

params Object

Request parameters

headers Object

[Optional] Request headers

Returns:

json result in promise

Type
Promise.<object>

<static> post(endpoint, params, onProgress, headers)

Send POST HTTP request to Apizee cloud platform

Parameters:
Name Type Description
endpoint String

URL Endpoint

params Object

Request parameters

onProgress function

Callback on progress event

headers Object

[Optional] Request headers

Returns:

json result in promise

Type
Promise.<object>

<static> put(endpoint, params, onProgress, headers)

Send PUT HTTP request to Apizee cloud platform

Parameters:
Name Type Description
endpoint String

URL Endpoint

params Object

Request parameters

onProgress function

Callback on progress event

headers Object

[Optional] Request headers

Returns:

json result in promise

Type
Promise.<object>

<static> request(endpoint, params, method, onProgress, headers)

Send HTTP request to Apizee cloud platform

Parameters:
Name Type Description
endpoint String

URL Endpoint

params Object

Request parameters

method string

HTTP method (GET, POST, PUT, DELETE)

onProgress function

Callback on progress event

headers Object

[Optional] Request headers

Returns:

json result in promise

Type
Promise.<Object>

setCloudURL(newurl)

Sets cloud url

Parameters:
Name Type Description
newurl String
Returns:
Type
Void