# ApifyRequestConfig<!-- -->

A request as the resource clients hand it to [HttpClient.call](https://docs.apify.com/api/client/js/reference/class/HttpClient.md#call).

## Index[](#Index)

### Properties

* [authorizationHeader](#authorizationHeader)
* [compression](#compression)
* [data](#data)
* [doNotRetryTimeouts](#doNotRetryTimeouts)
* [followRedirects](#followRedirects)
* [headers](#headers)
* [method](#method)
* [params](#params)
* [responseType](#responseType)
* [retryStatusCodes](#retryStatusCodes)
* [retryTransportErrors](#retryTransportErrors)
* [signal](#signal)
* [stringifyFunctions](#stringifyFunctions)
* [throwOnErrorStatus](#throwOnErrorStatus)
* [timeoutSecs](#timeoutSecs)
* [url](#url)

## Properties<!-- -->[](#Properties)

### [](#authorizationHeader)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L163)optionalauthorizationHeader

authorizationHeader?

<!-- -->

: Authorization | X-Apify-Authorization = Authorization | X-Apify-Authorization

Header that carries the client's API token for this request. The Apify API reads `Authorization`. Actor servers also accept `X-Apify-Authorization`, which the platform removes before the request reaches the Actor, so the `Authorization` header stays free for the Actor's own authentication. A per-request header of either name still wins.

### [](#compression)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L155)optionalcompression

compression?

<!-- -->

: false | [HttpCompressor](https://docs.apify.com/api/client/js/reference/interface/HttpCompressor.md)

How to compress the request body: an [HttpCompressor](https://docs.apify.com/api/client/js/reference/interface/HttpCompressor.md) for this request only, or `false` to send the body uncompressed. Defaults to the client's [HttpClient.httpCompressor](https://docs.apify.com/api/client/js/reference/class/HttpClient.md#httpCompressor).

### [](#data)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L135)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 stream (`Readable`, web `ReadableStream`) is sent as it is, and `URLSearchParams` is sent form-encoded. A `Blob` or `File`, such as one from `fs.openAsBlob()`, is streamed without being held in memory, under its own `type` when no `Content-Type` header is set. A `FormData` is rejected with a `TypeError`, since serializing one would send an empty body, and so is a web `ReadableStream` in a browser that cannot send one.

### [](#doNotRetryTimeouts)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L150)optionaldoNotRetryTimeouts

doNotRetryTimeouts?

<!-- -->

: boolean

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

### [](#followRedirects)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L184)optionalfollowRedirects

followRedirects?

<!-- -->

: boolean = true

Whether the transport follows redirects. With `false`, a redirect response is handled like an error status, so headers that carry the token never go to a host the server picked.

### [](#headers)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L125)optionalheaders

headers?

<!-- -->

: Record\<string, string>

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

### [](#method)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L118)method

method: GET | HEAD | POST | PUT | DELETE | CONNECT | OPTIONS | TRACE | PATCH

HTTP method.

### [](#params)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L123)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.

### [](#responseType)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L143)optionalresponseType

responseType?

<!-- -->

: [ApifyResponseType](https://docs.apify.com/api/client/js/reference.md#ApifyResponseType) = [ApifyResponseType](https://docs.apify.com/api/client/js/reference.md#ApifyResponseType)

### [](#retryStatusCodes)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L172)optionalretryStatusCodes

retryStatusCodes?

<!-- -->

: readonly

<!-- -->

number\[]

Status codes to retry. Defaults to rate limits (429) and server errors (5xx).

### [](#retryTransportErrors)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L178)optionalretryTransportErrors

retryTransportErrors?

<!-- -->

: boolean = true

Whether transport errors, timeouts included, are retried. With `false`, the first one fails the call, since the request may have reached the server before it failed.

### [](#signal)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L189)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`.

### [](#stringifyFunctions)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L148)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.

### [](#throwOnErrorStatus)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L170)optionalthrowOnErrorStatus

throwOnErrorStatus?

<!-- -->

: boolean = true

Whether an error status throws [ApifyApiError](https://docs.apify.com/api/client/js/reference/class/ApifyApiError.md). With `false`, the call resolves to the error response once no retry follows, and a rate limit (429) doesn't count toward the client's statistics, which track the API's rate limits.

### [](#timeoutSecs)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L141)optionaltimeoutSecs

timeoutSecs?

<!-- -->

: [Timeout](https://docs.apify.com/api/client/js/reference.md#Timeout) = [Timeout](https://docs.apify.com/api/client/js/reference.md#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)[](https://github.com/apify/apify-client-js/blob/84036425d1fb761bc98185b09045076b3c86192b/src/http_clients/base.ts#L116)url

url: string

Full URL of the endpoint, without the query string.
