Namespace: Rest

WonderPushSDK. Rest

Methods

fetch(method, path, params, body)

Use the fetch API call to retrieve data.

Parameters:
Name Type Description
method string

"GET" or "POST"

path string
params object
body object
Returns:

Promise

get(path, params, handlers, options)

Perform a GET request to WonderPush REST API.

Parameters:
Name Type Description
path string

API endpoint path

params object

key/value pair of query string parameters

handlers module:WonderPush.SDK.Handlers

request callbacks

options object

{fetch:bool}

post(path, params, body, handlers, options)

Perform a POST request to WonderPush REST API.

Parameters:
Name Type Description
path string

API endpoint path

params object

key/value pair of query string parameters

body mixed

(not implemented)

handlers module:WonderPush.SDK.Handlers

request callbacks

options object

{fetch:bool}

postEventually(path, params, body)

Perform a POST request to WonderPush REST API and ensure it goes to the server. No handler is possible for postEventually.

Parameters:
Name Type Description
path string

API endpoint path

params object

key/value pair of query string parameters

body mixed

(not implemented)