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
): Promise<Result>
Executes a batch request.
Parameter | Type | Description |
---|---|---|
calls | any[]|object | Batch of requests. |
isHaltOnError | boolean | Halt execution on error. |
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.