IPFS can't unpin from the HTTP API

I’m working on a react app using IPFS to store files, currently using superagent for making the requests. I can add files no problem from the web app for example:


Content-Disposition: form-data; name="blahblahfile.mp3"; filename="blahblahfile.mp3"
Content-Type: audio/mp3


But now i’m trying to implement an unpinning feature, which isn’t working. I make a request like the following:

and then garbage collect:

all the requests go through successfully but the item isn’t removed. One thing i think is odd is in the response for the pin/rm request there are no pins listed in the Pins array. My understanding is that it will return the hash you just unpinned.

I feel like it’s the pin/rm that is failing somewhere but i’m not exactly sure where. Note that i can perform these commands in the terminal and everything get’s unpinned and garbage collected properly.

Has anybody had a similar experience? Got any tips? Let me know if you need any more info, thanks! Really loving playing with and getting to know IPFS!

maybe you can check the js ipfs api in the doc it explain you can unpin a ressource you need just see how to do that : https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#ls (documentation).

Yeah i’ve Seen that… Just seems like the js implementation is still a little green so I was hoping to just use the http api since the ipfs docs say it does everything the GO implementation does. But yeah I might just get the js library instead o my project and test out of that functionality works. Might help me figure something out! Thanks for the reply :smile: