---
title: "Http (TypeHttp)"
description: "Low-level transport interface returned by `b24.getHttpClient(version)`. Direct access to the axios-based clients, restriction params, statistics, and reset."
canonical_url: "https://bitrix24.github.io/b24jssdk/docs/working-with-the-rest-api/core-http"
last_updated: "2026-06-02"
---
# Http (TypeHttp)

> Low-level transport interface returned by `b24.getHttpClient(version)`. Direct access to the axios-based clients, restriction params, statistics, and reset.

> [!NOTE]
> You normally use `actions.v2.*` / `actions.v3.*` and never touch `TypeHttp` directly. Reach for it when you need raw `call` / `batch`, custom limiter tuning, or runtime stats.

`TypeHttp` is the contract implemented by `HttpV2` and `HttpV3`. Each `B24Frame` / `B24Hook` / `B24OAuth` owns one instance per REST API version. Reach them through:

```ts
import { ApiVersion } from '@bitrix24/b24jssdk'

const v2 = $b24.getHttpClient(ApiVersion.v2)
const v3 = $b24.getHttpClient(ApiVersion.v3)
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| `apiVersion` | `ApiVersion` | `ApiVersion.v2` or `ApiVersion.v3` . |
| `ajaxClient` | `AxiosInstance` | Underlying axios instance. Reuse it for non-REST calls to the same origin. |

## Logger

```ts-type
setLogger(logger: LoggerInterface): void
getLogger(): LoggerInterface
```

Lets you swap a debug logger into a single client without affecting the rest of the SDK. See [Logger](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/logger.md).

## Calling REST

### `call`

```ts-type
call<T = unknown>(
  method: string,
  params: TypeCallParams,
  requestId?: string
): Promise<AjaxResult<T>>
```

Low-level single-method call. Higher-level helpers (`actions.v2.call.make`, `callList`, `fetchList`) build on top.

### `batch`

```ts-type
batch<T = unknown>(
  calls: BatchCommandsArrayUniversal | BatchCommandsObjectUniversal | BatchNamedCommandsUniversal,
  options?: ICallBatchOptions
): Promise<Result<ICallBatchResult<T>>>
```

Low-level batch call. Three input shapes are accepted:

- Array of tuples: `[ [method, params], [method, params] ]`
- Array of objects: `[ { method, params, as?, parallel? }, ... ]`
- Named map: `{ key1: { method, params }, key2: [method, params] }`

For most use cases call [`actions.v2.batch.make`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/batch-rest-api-ver2.md) / [`actions.v3.batch.make`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/batch-rest-api-ver3.md), which handle the response unwrapping and `returnAjaxResult`.

## Limiter Configuration

```ts-type
setRestrictionManagerParams(params: RestrictionParams): Promise<void>
getRestrictionManagerParams(): RestrictionParams
```

Replace or read the rate-limit / operating-limit / adaptive-delay configuration on **this** client. To change both v2 and v3 at once, prefer `b24.setRestrictionManagerParams(...)`.

See [Limiters](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/limiters.md) for the params shape and presets (`ParamsFactory.getDefault()`, `getBatchProcessing()`, `getRealtime()`, `fromTariffPlan()`).

## Statistics

```ts-type
getStats(): RestrictionManagerStats & {
  adaptiveDelayAvg: number
  errorCounts: Record<string, number>
  totalRequests: number
  successfulRequests: number
  failedRequests: number
  totalDuration: number
  byMethod: Map<string, { count: number, totalDuration: number }>
  lastErrors: { method: string, error: string, timestamp: number }[]
}
```

Snapshot of the limiter + per-method counters. Useful for dashboards. See [Limiters → Monitoring](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/limiters.md#monitoring-and-statistics) for the full breakdown.

## Reset

```ts-type
reset(): Promise<void>
```

Clears the limiter state and statistics. Typical use: after a destructive incident response or in long-running daemons that want a clean window.

## Client-Side Warning

```ts-type
setClientSideWarning(value: boolean, message: string): void
```

`B24Hook` and `B24OAuth` enable a runtime warning when used in a browser environment (their secrets must never reach the client). Toggle it from the parent class via `b24.offClientSideWarning()`; this method is the underlying primitive.

## Sitemap

See the full [sitemap](/b24jssdk/sitemap.md) for all pages.
