fetchJsonp

suspend fun fetchJsonp(callbackParameterName: String? = definedExternally): Any?(source)

Requests a resource using JSONP.

// load a data asynchronously
resource.fetchJsonp().then(function(data) {
// use the loaded data
}).catch(function(error) {
// an error occurred
});

Return

a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.

Parameters

callbackParameterName

The callback parameter name that the server expects. Default value - 'callback'

See also