Skip to content

Parameters

Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.

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.

VariableTypeDescription
urlstringThe URL to which the request is sent.
headersoptional, objectAn object of additional header key/value pairs to send.
bodyoptional, stringThe body of the request.
methodoptional, Z.Ajax.MethodThe HTTP method to use.
responseTypeoptional, stringThe response type.
withCredentialsoptional,booleanIndicates whether or not cross-site Access-Control requests should be made using credentials such as cookies or authorization headers.
timeoutoptional, numberA timeout (in milliseconds) for the request.