Advanced library based on node-fetch syntax and tls-client.
What is TLS Fingerprinting?
Some people think it is enough to change the user-agent header of a request to let the server think that the client requesting a resource is a specific browser. Nowadays this is not enough, because the server might use a technique to detect the client browser which is called TLS Fingerprinting. This library aims to defeat it.
/** * @description Demonstrates using the node-tls-client library to make HTTP requests with a specified timeout. * Note: The timeout is set per session and cannot be changed during the session. * * @see{@linkhttps://sahil1337.github.io/node-tls-client/interfaces/SessionOptions.html SessionOptions} for more details. */
/** * @description Demonstrates an advanced usage scenario with the node-tls-client library, showcasing custom TLS client configuration. * * This example illustrates the creation of a TLS session with tailored settings and the execution of a GET request. * * Custom TLS settings encompass a wide array of configurations, including: * - JA3 string specification * - Fine-tuning HTTP/2 settings * - Defining supported signature algorithms * - Specifying ALPN (Application-Layer Protocol Negotiation) protocols * - Declaring supported TLS versions * - Setting key share curves for cryptographic key exchange * - Choosing a certificate compression algorithm * - Configuring connection and header flow parameters * - Defining the order of headers and priority frames * - Providing default headers for HTTP requests * * @see{@linkhttps://sahil1337.github.io/node-tls-client/interfaces/SessionOptions.html SessionOptions} for more details on session options. */
This boolean value indicates whether the request was successful or not. It returns "true" if the response status is within the range 200-299, indicating success. Otherwise, it returns "false".`
headers
This object contains the response headers returned by the server.
status
This integer represents the HTTP status code of the response.
url
This is the URL to which the request was made.
cookies
Returns an object containing the cookies for that URL.
Methods
Description
text()
Returns a promise that resolves with the response body as plain text.
json()
Returns a promise that resolves with the response body parsed as JSON.