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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pass in Options Object to http Constructor #37

Merged
merged 1 commit into from
Apr 21, 2020
Merged

feat: pass in Options Object to http Constructor #37

merged 1 commit into from
Apr 21, 2020

Conversation

leoherzog
Copy link
Contributor

It looks like the function was written to allow this as a parameter, but it was never used. This should allow for use cases like specifying custom headers while using urlSource. The node-fetch module falls back on default options if none are specified, so we shouldn't need to check and send an empty object at this step.

@leoherzog
Copy link
Contributor Author

You'll have to forgive me, this is my first time contributing to IPFS. I'm not sure why Travis failed on this one.

✖   subject may not be empty [subject-empty]
✖   type may not be empty [type-empty]

https://travis-ci.com/github/ipfs/js-ipfs-utils/jobs/320457226

I seem to be missing a subject and type, but I don't know where that would go.

@hugomrdias
Copy link
Member

You'll have to forgive me, this is my first time contributing to IPFS. I'm not sure why Travis failed on this one.

✖   subject may not be empty [subject-empty]
✖   type may not be empty [type-empty]

travis-ci.com/github/ipfs/js-ipfs-utils/jobs/320457226

I seem to be missing a subject and type, but I don't know where that would go.

3 lines below there's a get help link

It looks like the function was written to allow this as a parameter, but it was never used. This should allow for use cases like specifying custom headers while using `urlSource`. The `node-fetch` module falls back on [default options](https://github.com/node-fetch/node-fetch#options) if none are specified, so we shouldn't need to check and send an empty object at this step.
@leoherzog
Copy link
Contributor Author

Thanks for the heads up, I hadn't seen the subject line section in the contributing guidelines. Should be good to go now.

@hugomrdias hugomrdias changed the title Pass in Options Object to http Constructor feat: pass in Options Object to http Constructor Apr 21, 2020
@hugomrdias hugomrdias merged commit 727f28d into ipfs:master Apr 21, 2020
@leoherzog leoherzog deleted the patch-1 branch April 21, 2020 20:01
leoherzog added a commit to leoherzog/LinuxExchangeIPFSSeedbox that referenced this pull request May 2, 2020
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