Skip to main content
Version: Next

ApifyRequestConfig

A request as the resource clients hand it to HttpClient.call.

Index

Properties

optionaldata

data?: unknown

Request body. A plain object or array is serialized to JSON and sent as application/json, or form-encoded when a Content-Type: application/x-www-form-urlencoded header asks for it. A string, binary value (Buffer, ArrayBuffer, typed array) or Readable is sent as it is, and URLSearchParams is sent form-encoded. A Blob, File, FormData or web ReadableStream is rejected with a TypeError, since serializing one would send an empty body.

optionaldoNotRetryTimeouts

doNotRetryTimeouts?: boolean

Give up on the first transport timeout instead of retrying it.

optionalheaders

headers?: Record<string, string>

Per-request headers. They win over the client's default headers, header names compared case-insensitively.

method

method: HttpMethod

HTTP method.

optionalparams

params?: Record<string, unknown>

Query parameters. undefined values are dropped, booleans are sent as 1 and 0, Date values as ISO 8601 strings and arrays comma-separated.

optionalresponseType

optionalsignal

signal?: AbortSignal

Aborts the call. Once the signal aborts, the attempt in flight is ended, no retry follows, and the call rejects with the signal's reason.

optionalstringifyFunctions

stringifyFunctions?: boolean

Serialize function-valued fields of a JSON body to their source instead of dropping them, which is how Actor input carrying page functions reaches the API.

optionaltimeoutSecs

timeoutSecs?: Timeout = Timeout

Timeout of the request: a tier name, a number of seconds, or 'noTimeout'. The client resolves it to the timeout of each attempt in milliseconds, doubling it with every retry up to timeoutMaxSecs.

url

url: string

Full URL of the endpoint, without the query string.