node-zendesk / Exports / clients/transporter / Transporter
Class: Transporter
clients/transporter.Transporter
Table of contents
Constructors
Properties
Methods
- emit
- getBodyForRequest
- getHeadersForRequest
- getJSONBody
- on
- prepareOptionsForRequest
- request
- sendRequest
- setSideLoad
- upload
Constructors
constructor
• new Transporter(options
, sideLoad?
, useDotJson?
): Transporter
Parameters
Name | Type |
---|---|
options | any |
sideLoad? | any [] |
useDotJson? | boolean |
Returns
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
Name | Type |
---|---|
eventType | any |
eventData | any |
Returns
void
Defined in
clients/transporter.d.ts:12
getBodyForRequest
▸ getBodyForRequest(method
, body
): string
Parameters
Name | Type |
---|---|
method | any |
body | any |
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
Name | Type |
---|---|
body | any |
Returns
string
Defined in
clients/transporter.d.ts:29
on
▸ on(eventType
, callback
): void
Parameters
Name | Type |
---|---|
eventType | any |
callback | any |
Returns
void
Defined in
clients/transporter.d.ts:13
prepareOptionsForRequest
▸ prepareOptionsForRequest(method
, uri
, body
, isBinary?
): any
Parameters
Name | Type |
---|---|
method | string |
uri | any |
body | any |
isBinary? | boolean |
Returns
any
Defined in
clients/transporter.d.ts:26
request
▸ request(method
, uri
, body?
): Promise
<{ response
: any
; result
: {} }>
Parameters
Name | Type |
---|---|
method | any |
uri | any |
body? | any |
Returns
Promise
<{ response
: any
; result
: {} }>
Defined in
clients/transporter.d.ts:14
sendRequest
▸ sendRequest(options
): Promise
<{ response
: any
; result
: {} }>
Parameters
Name | Type |
---|---|
options | any |
Returns
Promise
<{ response
: any
; result
: {} }>
Defined in
clients/transporter.d.ts:22
setSideLoad
▸ setSideLoad(array
): void
Parameters
Name | Type |
---|---|
array | any |
Returns
void
Defined in
clients/transporter.d.ts:30
upload
▸ upload(uri
, file
): Promise
<{ response
: any
; result
: {} }>
Parameters
Name | Type |
---|---|
uri | any |
file | any |
Returns
Promise
<{ response
: any
; result
: {} }>
Defined in
clients/transporter.d.ts:18