OAuthXHRRequest

Extends


Properties

data?

optional data: string;

The data to send as the body of the request

Inherited from

XHRRequest.data


headers?

optional headers: object;

Headers to send with the request. If specifying an array, multiple headers with the same name will be sent

Index signature

[key: string]: string | string[]

Inherited from

XHRRequest.headers


method?

optional method: string;

HTTP method, e.g. "POST". If omitted, GET is used

Inherited from

XHRRequest.method


postResultTo?

optional postResultTo: string;

When present, forwards the result of this request to the specified destination. Instead, this request returns
whether the request will be made and forwarded, and not the actual request.

Note: There is an allow list which limits where the result can be posted. It is currently only to the result of
LinkUnfurlBlockProxy#experimentalStartPDFUpload


responseFormat?

optional responseFormat: SendXHRResponseFormat;

The desired format for the returned response body. Defaults to 'utf8'.

  • If 'utf8', the response body will be returned as a string.
  • If 'binary', the response body will be returned as a Uint8Array.

Inherited from

XHRRequest.responseFormat


streamCallback()?

optional streamCallback: (chunk) => void;

For utf8 responses, you can have the result streamed to you for endpoints that support it.

Parameters

ParameterType
chunkstring

Returns

void

Inherited from

XHRRequest.streamCallback


timeoutMs?

optional timeoutMs: number;

If specified, this request should time out after the given number of milliseconds

Inherited from

XHRRequest.timeoutMs


url

url: string;

URL to request

Inherited from

XHRRequest.url