Node's standard https module allows for the assignment of a certificate directly to the options object when making requests with the module. This means that the certificate must be manually obtained and set up prior to using the module, and should be stored in a secure location.
In contrast, node-fetch's implementation of HTTPS relies on the underlying implementation of the fetch API, which includes built-in support for HTTPS requests. This includes default handling of certificates and provides more flexible options for handling certificates than the standard https module. For example, a certificate can be specified via an external URL or bundled directly with the request.
Overall, while both modules ultimately provide secure HTTPS requests, they differ in their implementation details and the level of control they offer over the handling of certificates.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-07-08 11:52:06 +0000
Seen: 8 times
Last updated: Jul 08 '23