ipfs / js-ipfs

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

Pin a file not working #4063

Closed dropdisco closed 2 years ago

dropdisco commented 2 years ago

Version: ^52.0.0 sample code

fetch('https://ipfs.infura.io:5001/api/v0/pin/add?arg=/ipfs/' + hash, {})

response: (Failed to load resource: the server responded with a status of 405 (Method Not Allowed) https://ipfs.infura.io:5001/api/v0/pin/add?arg=/ipfs/QmXpPpLvNnGrovM5t3yMQa18NVoG2PvEUhDwbcy7Nwe74Y

welcome[bot] commented 2 years ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.

lidel commented 2 years ago

@Agin-DropDisco the RPC API at /api/v0 is POST-only, switch HTTP request from GET to POST.

dropdisco commented 2 years ago

thx closed!