Ask Your Question
3

How do Node's standard https and node-fetch differ in their approach to providing a certificate?

asked 2023-07-08 11:52:06 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-07-08 11:55:02 +0000

lalupa gravatar image

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.

edit flag offensive delete link more

Your Answer

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

Add Answer


Question Tools

Stats

Asked: 2023-07-08 11:52:06 +0000

Seen: 8 times

Last updated: Jul 08 '23