TypeHttp
ts
import { type TypeHttp } from '@bitrix24/b24jssdk'
Implementation:
Methods
getLogger
ts
getLogger(): LoggerBrowser
Returns the current logger.
setLogger
ts
setLogger(logger: LoggerBrowser): void
Sets 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): void
Sets parameters for the restriction manager.
Parameter | Type | Description |
---|---|---|
params | TypeRestrictionManagerParams | Parameters to set. |
getRestrictionManagerParams
ts
getRestrictionManagerParams(): TypeRestrictionManagerParams
Returns parameters for the restriction manager.
setLogTag
ts
setLogTag(logTag?: string): void
Sets a tag for logging.
clearLogTag
ts
clearLogTag(): void
Clears the set tag for logging.
setClientSideWarning
ts
setClientSideWarning(value: boolean, message: string): void
Controls the warning about request execution on the front-end side. Used in B4Hook.