ipfs / js-ipfs

IPFS implementation in JavaScript
https://js.ipfs.tech
Other
7.43k stars 1.25k forks source link

fix: crash when using searchParams option #4341

Closed sk-gachou closed 1 year ago

sk-gachou commented 1 year ago

This pull attempt to fix the issue when trying to use searchParams option for http client.

According to the doc, one can provide searchParams (an URLSearchParams instance) to add extra query parameters. Currently, this behaviour does not work, see this gist: https://gist.github.com/sk-gachou/2dd253acb1e1663e37119120c2db4768

It crash at this line: https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-http-client/src/lib/to-url-search-params.js#L42

welcome[bot] commented 1 year ago

Thank you for submitting this PR! A maintainer will be here shortly to review it. We are super grateful, but we are also overloaded! Help us by making sure that:

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment. Next steps:

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. We are very grateful for your contribution!

achingbrain commented 1 year ago

js-IPFS is in the process of being deprecated, the replacement is Helia - please see the State of IPFS in JS post for a bit of background and the migration guide for how to port your app over.

You're using ipfs-http-client - if you are talking to a Kubo node, please use kubo-rpc-client instead and open any issues there.