FetchHttpClient
Hierarchy
- BaseHttpClient
- FetchHttpClient
Index
Constructors
Methods
Constructors
constructor
Parameters
optionaloptions: { logger?: CrawleeLogger }
optionallogger: CrawleeLogger
Returns FetchHttpClient
Methods
inheritedsendRequest
Public fetch-like method that handles redirects and uses provided proxy and cookie jar.
Like
fetch, it honors theredirectmode of the request:follow(the default) follows redirects,manualreturns the redirect response as is anderrorrejects. Unlike theopaqueredirectresponse offetch, the redirect response returned withmanualkeeps its status, headers and body.Parameters
initialRequest: Request
optionaloptions: SendRequestOptions
Returns Promise<Response>
A HTTP client implementation using the native
fetchAPI.This implementation does not support proxying and throws when a request asks for a proxy.