Warning
This version contains breaking changes.
- Call
<session>.init()
after setting up a session and before using any HTTP methods. (See the documentation for more details.) - Resolved memory leak issues by moving to workerpool.
- Added new profiles:
chrome_131
,chrome_131_psk
,firefox_132
,firefox_133
, andios_safari_18
. The default profile is nowchrome_131
(previouslychrome_124
). - Introduced the
isRotatingProxy
option for handling rotating proxies. PS: SessionOptions
Important
This version includes significant updates and improvements.
response.cookies
is now a property instead of a method. [Note:response.cookies()
has been removed and replaced withresponse.cookies
.]
- Added
session.cookies
property to retrieve all session cookies. For detailed information, see examples/session-cookies.md. - Added
byteResponse
option in requestOptions. Setting this to true ensures that the response is treated as a byte response. For detailed information, see examples/images.js - Added functionality to send binary data. Note: Ensure that the appropriate headers are set before sending binary data in the body.
- Added
disableIPV6
anddisableIPV4
options inSessionOptions
. For detailed information, see SessionOptions - Added
hostOverride
property in requestOptions. Used to override the Host header, typically needed when making requests directly to an IP address. chrome_124
profile will be used when noclient_identifier
is specified in session options.- Refactored cookies.ts and session typings for improved readability (internal change, no impact on existing use cases)
- Updated TlsResponse according to new changes.
Warning
This version contains breaking changes.
response.json()
andresponse.text()
methods now return aPromise
.response.cookies()
now returns an object of cookies instead of aPromise
.session.methods
no longer include thetimeout
andrejectUnauthorized
options. Since timeout cannot be changed during a session, ensure to specifytimeout
&rejectUnauthorized
in SessionOptions when creating a session.
fetch(fetchOptions)
method have been added to use different timeouts & rejectUnauthorized values in each request. [examples/timeout.js] for more information.
- Fixed a typo that prevented timeout from working correctly.
- Introduced client profile types.
- Enhanced documentation for improved clarity and usability.
- Updated the README with minor adjustments.
- Refined interface definitions for better readability and understanding.
- Implemented dynamic methods for downloading shared files in "node-tls-client", eliminating the inclusion of prebuilt files.
- Path used for storing the shared library files is strictly set to tmpdir path.
- Reduces package size.
- Ensures better support for executables.
- Improved handling of shared library files:
- Only the shared library file matching the current operating system is preserved. All other shared library files are deleted.
- Added support for executables.