Class: NodeHttpExecutor
Extends
HttpExecutor<ClientRequest>
Constructors
Constructor
new NodeHttpExecutor():
NodeHttpExecutor
Returns
NodeHttpExecutor
Inherited from
Properties
maxRedirects
protectedreadonlymaxRedirects:10=10
Inherited from
Methods
addErrorAndTimeoutHandlers()
addErrorAndTimeoutHandlers(
request,reject,timeout?):void
Parameters
request
any
reject
(error) => void
timeout?
number
Returns
void
Inherited from
HttpExecutor.addErrorAndTimeoutHandlers
addRedirectHandlers()
protectedaddRedirectHandlers(request,options,reject,redirectCount,handler):void
Parameters
request
any
options
RequestOptions
reject
(error) => void
redirectCount
number
handler
(options) => void
Returns
void
Inherited from
HttpExecutor.addRedirectHandlers
createMaxRedirectError()
protectedcreateMaxRedirectError():Error
Returns
Error
Inherited from
HttpExecutor.createMaxRedirectError
createRequest()
createRequest(
options,callback):ClientRequest
Parameters
options
any
callback
(response) => void
Returns
ClientRequest
Overrides
doApiRequest()
doApiRequest(
options,cancellationToken,requestProcessor,redirectCount?):Promise<string>
Parameters
options
RequestOptions
cancellationToken
requestProcessor
(request, reject) => void
redirectCount?
number
Returns
Promise<string>
Inherited from
doDownload()
protecteddoDownload(requestOptions,options,redirectCount):void
Parameters
requestOptions
RequestOptions
options
DownloadCallOptions
redirectCount
number
Returns
void
Inherited from
downloadToBuffer()
downloadToBuffer(
url,options):Promise<Buffer<ArrayBufferLike>>
Parameters
url
URL
options
Returns
Promise<Buffer<ArrayBufferLike>>
Inherited from
request()
request(
options,cancellationToken?,data?):Promise<string|null>
Parameters
options
RequestOptions
cancellationToken?
data?
{[name: string]: any; } | null
Returns
Promise<string | null>
Inherited from
isCrossOrigin()
staticisCrossOrigin(originUrl,targetUrl):boolean
Whether targetUrl is on another origin than originUrl for the purpose of sending credentials: another host, port or
scheme, except an http → https upgrade of the same host on the default ports.
Parameters
originUrl
URL
targetUrl
URL
Returns
boolean
Inherited from
prepareRedirectUrlOptions()
staticprepareRedirectUrlOptions(redirectUrl,options):RequestOptions
Parameters
redirectUrl
string
options
RequestOptions
Returns
RequestOptions
Inherited from
HttpExecutor.prepareRedirectUrlOptions
removeCrossOriginSensitiveHeaders()
staticremoveCrossOriginSensitiveHeaders(headers,originUrl,targetUrl):OutgoingHttpHeaders
headers without the credential-bearing ones stripped on cross-origin redirects (see addSensitiveRedirectHeader)
when targetUrl is on another origin than originUrl (same rule as a redirect), else headers itself. Never mutates headers.
Parameters
headers
OutgoingHttpHeaders
originUrl
URL
targetUrl
URL
Returns
OutgoingHttpHeaders
Inherited from
HttpExecutor.removeCrossOriginSensitiveHeaders
retryOnServerError()
staticretryOnServerError(task,maxRetries?):Promise<any>
Parameters
task
() => Promise<any>
maxRetries?
number
Returns
Promise<any>
Inherited from
HttpExecutor.retryOnServerError
sensitiveHeaderNames()
staticsensitiveHeaderNames(headers):string[]
The names in headers of the credential-bearing headers stripped on cross-origin redirects (see addSensitiveRedirectHeader).
Parameters
headers
OutgoingHttpHeaders
Returns
string[]