Interface RequestInit

Contains network request properties used to modify an HTTP request.

interface RequestInit {
    body?: RequestBody;
    headers?: HTTPHeaders;
    mediaType?: MediaType;
    method?: RequestMethod;
    responseType?: ResponseType;
    subType?: RequestSubType;
    type?: RequestType;
    url?: string;
    useCredentials?: boolean;
}

Properties

The request's body.

Default Value

The original request's body.
headers?: HTTPHeaders

The request's HTTP headers.

Default Value

The original request's HTTP headers.
mediaType?: MediaType

The request's media type.

Default Value

The original request's media type.
method?: RequestMethod

The request's HTTP method.

Default Value

The original request's HTTP method.
responseType?: ResponseType

The request's response type.

Default Value

The original request's response type.
subType?: RequestSubType

The request's subtype.

Default Value

The original request's subtype.

The request's type.

Default Value

The original request's type.
url?: string

The request's URL.

Default Value

The original request's URL.
useCredentials?: boolean

Whether the player is allowed to use credentials for cross-origin requests.

Remarks


- Credentials are cookies, authorization headers or TLS client certificates.

Default Value

The original request's useCredentials value.

Generated using TypeDoc