URL of the target endpoint. Supports both HTTP and HTTPS schemes.
Additional HTTP headers to add. It's only recommended to use this option, with headers that are typically added by websites, such as cookies. Overriding default browser headers will remove the masking this function provides.
An HTTP proxy to be passed down to the HTTP request. Supports proxy authentication with Basic Auth.
Configuration to be used for generating correct browser headers. See the
Two-letter ISO 639 language code.
Two-letter ISO 3166 country code.
true, the function uses User-Agent of a mobile browser.
If set to true, SSL/TLS certificate errors will be ignored.
Node.js' HTTP parser is stricter than parsers used by web browsers, which prevents scraping of websites whose servers do not comply with HTTP specs,
either by accident or due to some anti-scraping protections, causing e.g. the
invalid header value char error. The
forces the HTTP parser to ignore certain errors which lets you scrape such websites. However, it will also open your application to some security
vulnerabilities, although the risk should be negligible as these vulnerabilities mainly relate to server applications, not clients. Learn more in this
response object as a single parameter and should return
false. If function returns true, request gets aborted.
If set to false, it will prevent use of HTTP2 requests. This is strongly discouraged. Websites expect HTTP2 connections, because browsers use HTTP2 by
default. It will automatically downgrade to HTTP/1.1 for websites that do not support HTTP2. For Node 10 this option is always set to
Node 10 does not support HTTP2 very well. Upgrade to Node 12 for better performance.