Skip to content

node-zendesk / Exports / clients/transporter / Transporter

Class: Transporter

clients/transporter.Transporter

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Transporter(options, sideLoad?, useDotJson?): Transporter

Parameters

NameType
optionsany
sideLoad?any[]
useDotJson?boolean

Returns

Transporter

Defined in

clients/transporter.d.ts:2

Properties

authHandler

authHandler: AuthorizationHandler

Defined in

clients/transporter.d.ts:6


endpointChecker

endpointChecker: EndpointChecker

Defined in

clients/transporter.d.ts:8


eventTarget

eventTarget: CustomEventTarget

Defined in

clients/transporter.d.ts:7


options

options: any

Defined in

clients/transporter.d.ts:3


responseAdapter

responseAdapter: any

Defined in

clients/transporter.d.ts:10


sideLoad

sideLoad: any[]

Defined in

clients/transporter.d.ts:4


transportFn

transportFn: any

Defined in

clients/transporter.d.ts:9


useDotJson

useDotJson: boolean

Defined in

clients/transporter.d.ts:5


userAgent

userAgent: any

Defined in

clients/transporter.d.ts:11

Methods

emit

emit(eventType, eventData): void

Parameters

NameType
eventTypeany
eventDataany

Returns

void

Defined in

clients/transporter.d.ts:12


getBodyForRequest

getBodyForRequest(method, body): string

Parameters

NameType
methodany
bodyany

Returns

string

Defined in

clients/transporter.d.ts:28


getHeadersForRequest

getHeadersForRequest(): any

Returns

any

Defined in

clients/transporter.d.ts:27


getJSONBody

getJSONBody(body): string

Parameters

NameType
bodyany

Returns

string

Defined in

clients/transporter.d.ts:29


on

on(eventType, callback): void

Parameters

NameType
eventTypeany
callbackany

Returns

void

Defined in

clients/transporter.d.ts:13


prepareOptionsForRequest

prepareOptionsForRequest(method, uri, body, isBinary?): any

Parameters

NameType
methodstring
uriany
bodyany
isBinary?boolean

Returns

any

Defined in

clients/transporter.d.ts:26


request

request(method, uri, body?): Promise<{ response: any ; result: {} }>

Parameters

NameType
methodany
uriany
body?any

Returns

Promise<{ response: any ; result: {} }>

Defined in

clients/transporter.d.ts:14


sendRequest

sendRequest(options): Promise<{ response: any ; result: {} }>

Parameters

NameType
optionsany

Returns

Promise<{ response: any ; result: {} }>

Defined in

clients/transporter.d.ts:22


setSideLoad

setSideLoad(array): void

Parameters

NameType
arrayany

Returns

void

Defined in

clients/transporter.d.ts:30


upload

upload(uri, file): Promise<{ response: any ; result: {} }>

Parameters

NameType
uriany
fileany

Returns

Promise<{ response: any ; result: {} }>

Defined in

clients/transporter.d.ts:18

Released under the MIT License.