Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs on migrating from request to fetch? #3480

Open
JoshuaKGoldberg opened this issue Dec 29, 2023 · 1 comment
Open

Docs on migrating from request to fetch? #3480

JoshuaKGoldberg opened this issue Dec 29, 2023 · 1 comment

Comments

@JoshuaKGoldberg
Copy link

Overview

馃憢 Coming over from Munter/hyperlink#200: I'd like to migrate hyperlink over to using native fetch(). It looks pretty straightforward except for two request() options:

gzip looks like it can be dropped:

request/README.md

Lines 1038 to 1039 in 3c0cddc

For backwards-compatibility, response compression is not supported by default.
To accept gzip-compressed responses, set the `gzip` option to `true`. Note

...but strictSSL I don't understand how it's different from fetch():

- `strictSSL` - if `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.

Could we please have a guide on how to migrate off some of these non-standard properties? I think it'd be helpful for anybody who, like me, isn't familiar with request and is wondering about their nuances.

Note that this is not the same as what's currently in #3143. That's a summary table of alternative libraries that doesn't go into depth.

@msimerson
Copy link

strictSSL is fairly straight forward. If you search this repo for strictSSL, you'll find this:

if (self.strictSSL === false) {
    self.rejectUnauthorized = false

rejectUnauthorized is a node tls option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants