Skip to main content
Version: Next

abstractBaseHttpClient

Base HTTP client that provides fetch-like sendRequest with Crawlee-managed behaviors (redirect handling, proxy and cookie handling). Concrete clients implement only the low-level network call in fetch.

Hierarchy

Implements

Index

Constructors

Methods

Constructors

constructor

Methods

sendRequest

  • sendRequest(initialRequest, options): Promise<Response>
  • Public fetch-like method that handles redirects and uses provided proxy and cookie jar.

    Like fetch, it honors the redirect mode of the request: follow (the default) follows redirects, manual returns the redirect response as is and error rejects. Unlike the opaqueredirect response of fetch, the redirect response returned with manual keeps its status, headers and body.


    Parameters

    Returns Promise<Response>

Page Options