Skip to content

fix(node): allow passing requesterOptions#1215

Merged
Haroenv merged 6 commits intomasterfrom
fix/node-requester-allow-options
Oct 19, 2020
Merged

fix(node): allow passing requesterOptions#1215
Haroenv merged 6 commits intomasterfrom
fix/node-requester-allow-options

Conversation

@bodinsamuel
Copy link
Copy Markdown

On the crawler we are trying to control more our http connections
and we would like to modify the behavior of the client to test a few things, especially the family options.

This option is related to ip resolution and a "fix" to reduse some network errors like: ENOTFOUND EAI_AGAIN
Those errors are the most common ones that triggers the infamous "Unreachable hosts"
ref: nodejs/node#5436 (comment)
(personal opinion would be to use family: 4 by default, DM for more about this)

If you are not confident letting people modify the whole options, we'll be fine with just the family option.

@bodinsamuel bodinsamuel self-assigned this Oct 18, 2020
@Haroenv
Copy link
Copy Markdown
Contributor

Haroenv commented Oct 19, 2020

I think it works better like this: #1184, I just closed the PR since my use case was for an unofficial API and I didn't see the use case other than my own.

Do you think you could take an approach like that PR?

@bodinsamuel
Copy link
Copy Markdown
Author

That means, I would need to pass the request options to all call?

@Haroenv
Copy link
Copy Markdown
Contributor

Haroenv commented Oct 19, 2020

that's a fair comment, can we call it requesterOptions though?

@Haroenv Haroenv changed the title fix(node): allow passing requestOptions fix(node): allow passing requesterOptions Oct 19, 2020
@Haroenv Haroenv merged commit 4348b38 into master Oct 19, 2020
@Haroenv Haroenv deleted the fix/node-requester-allow-options branch October 19, 2020 19:45
@bodinsamuel
Copy link
Copy Markdown
Author

thanks @Haroenv 🙏🏻

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

Successfully merging this pull request may close these issues.

2 participants