interface Parameters {
    url: string;
    headers?: { [id : string]: string };
    body?: string;
    method?: Method;
    responseType?: string;
    withCredentials?: boolean;
    timeout?: number;

A set of parameters that configure the Z.ajax(...) request.

The server that responds to your request must include a “Access-Control-Allow-Origin: *” header in its response.

We highly recommend using HTTPS for all calls using this function. In addition to the security benefits for your users, Apple are deprecating HTTP-only network connections from apps.


Variable Type Description
url string The URL to which the request is sent.
headers optional, object An object of additional header key/value pairs to send.
body optional, string The body of the request.
method optional, Z.Ajax.Method The HTTP method to use.
responseType optional, string The response type.
withCredentials optional,boolean Indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies or authorization headers.
timeout optional, number A timeout (in milliseconds) for the request.
zapcode branded_zapcode i