TypeHttp
ts
import { type TypeHttp } from '@bitrix24/b24jssdk'Implementation:
Methods
getLogger
ts
getLogger(): LoggerBrowserReturns the current logger.
setLogger
ts
setLogger(logger: LoggerBrowser): voidSets the logger.
batch
ts
batch(
calls: any[] | object,
isHaltOnError: boolean,
returnAjaxResult ? : boolean
):
Promise<Result>Executes a batch request.
| Parameter | Type | Description |
|---|---|---|
calls | any[]|object | Batch of requests. |
isHaltOnError | boolean | Halt execution on error. |
returnAjaxResult | boolean | Return Record<string | number, AjaxResult> | AjaxResult[] in response. |
Returns a Promise that resolves to a Result object.
call
ts
call(
method: string,
params: object,
start: number
): Promise<AjaxResult>Calls a method with the specified parameters.
| Parameter | Type | Description |
|---|---|---|
method | string | Method to call. |
params | object | Request parameters. |
start | number | Starting position. |
Returns a Promise that resolves to an AjaxResult object.
setRestrictionManagerParams
ts
setRestrictionManagerParams(params: TypeRestrictionManagerParams): voidSets parameters for the restriction manager.
| Parameter | Type | Description |
|---|---|---|
params | TypeRestrictionManagerParams | Parameters to set. |
getRestrictionManagerParams
ts
getRestrictionManagerParams(): TypeRestrictionManagerParamsReturns parameters for the restriction manager.
setLogTag
ts
setLogTag(logTag?: string): voidSets a tag for logging.
clearLogTag
ts
clearLogTag(): voidClears the set tag for logging.
setClientSideWarning
ts
setClientSideWarning(value: boolean, message: string): voidControls the warning about request execution on the front-end side. Used in B4Hook.