--- id: custom-http-client title: Using a custom HTTP client (Experimental) description: Use a custom HTTP client for `sendRequest` and plain-HTTP crawling --- import ApiLink from '@site/src/components/ApiLink'; import CodeBlock from '@theme/CodeBlock'; import ImplementationSource from '!!raw-loader!./implementation.ts'; import UsageSource from '!!raw-loader!./usage.ts'; The `BasicCrawler` class allows you to configure the HTTP client implementation using the `httpClient` constructor option. This might be useful for testing or if you need to swap out the default implementation based on `got-scraping` for something else, such as `curl-impersonate` or `axios`. The HTTP client implementation needs to conform to the `BaseHttpClient` interface. For a rough idea on how it might look, see a skeleton implementation that uses the standard `fetch` interface: {ImplementationSource} You may then instantiate it and pass to a crawler constructor: {UsageSource} Please note that the interface is experimental and it will likely change with Crawlee version 4.