Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

fixed headers to have correct order.

Petr Patek1be234e861b7
diff --git a/test/utils_request.js b/test/utils_request.js
index ee4889e15..b78d2846f 100644
--- a/test/utils_request.js
+++ b/test/utils_request.js
@@ -163,7 +163,7 @@ describe('Apify.utils_request', () => {
const response = await requestAsBrowser(options);
expect(response.statusCode).to.eql(200);
- expect(JSON.parse(response.body)['User-Agent']).to.be.eql(options.headers['User-Agent']);
+ expect(JSON.parse(response.body)['user-agent']).to.be.eql(options.headers['User-Agent']);
});
it('headers has same format as in firefox', async () => {