Log in
Log in with USB
Inloggen met vingerafdruk wordt binnenkort mogelijk.
Last change: January 15, 2020
Current version: 1.3.1
The sendToAPI module can be used to send the received data as json body to the given url.
webanizr.send('sendToAPI', data, parameters, callback, error);
The sendToAPI module accepts the following parameters:
The url of the static source or simple API. The URL should return valid JSON data.
This parameter only accepts one value: "inmodule". If this value is present, the json is cached and the url will no longer be used to retreive the data. The cache is cleared when reloading the page.
If this parameter is omitted no caching is applied.
The method to use: GET, PUT, POST or DELETE. If the parameter is not set, POST is assumed.
If set to true, the module looks for a meta tag with the name "webanizr-token" in the head. The value of this tag will be send as security token to the API.
The security token to send to the API.
This callback function is called when the data is retrieved. The function gets the retreived data as parameter. If the retreival of the data results in an error the callback function is not called, and instead the error callback is called.
Only available for version 1.3.2 and upwards, combined with version 1.16.0 and upwards of webanizr.js.
This callback function is called when the return code of the request was not equal to 200.