net-ipfs-http-client icon indicating copy to clipboard operation
net-ipfs-http-client copied to clipboard

Support for go-ipfs v0.5

Open lidel opened this issue 4 years ago • 9 comments

This is a notice I'm filling in repo of every HTTP Client I can find. Feel free to close it if this project already works fine with go-ipfs 0.5

POST-only HTTP API

go-ipfs 0.5 will block GET commands on the API port (https://github.com/ipfs/go-ipfs/pull/7097), requiring every command (RPC) to be sent as HTTP POST request. See API reference docs: https://docs.ipfs.io/reference/api/http/

This is potentially a breaking change, double check if this project uses POST for every RPC call.

Testing

Download links for v0.5-rc* are available at https://github.com/ipfs/go-ipfs/issues/7109

You can also test using an ephemeral Docker container:

$ docker run --rm -it --net=host ipfs/go-ipfs:v0.5.0-rc1 

lidel avatar Apr 08 '20 00:04 lidel

Can confirm it does not work with 0.5.

However, in my read, the code is structure nicely that making them use a POST doesn't look wildly complicated, however I suspect more work would be needed to perhaps know the version the server runs?

CmdrKeen avatar Jun 03 '20 23:06 CmdrKeen

I don't believe checking version is needed: old versions of go-ipfs support POST already.

lidel avatar Jun 05 '20 08:06 lidel

@richardschneider it would be great to get this fix as currently the FileSystem.GetAsync method fails as method not supported. It needs to be a POST and not a GET from now on so it seems.

cburnette avatar Jul 03 '20 15:07 cburnette

@richardschneider it would be great to get this fix as currently the FileSystem.GetAsync method fails as method not supported. It needs to be a POST and not a GET from now on so it seems.

Block.GetAsync() is suffering from the same issue it seems...

OscarPDR avatar Jul 07 '20 13:07 OscarPDR

Sensing that this has been abandoned - 2021 - GET is still broken - getting 405 method not allowed - and adding GET to http methods on ipfs node allow list - does not resolve.

Baaleos avatar Feb 27 '21 14:02 Baaleos

@Baaleos just like noted in my original comment here, the fix is to send all API requests as POST. Can you try https://github.com/richardschneider/net-ipfs-http-client/pull/64 and see if that branch works for you?

lidel avatar Mar 01 '21 17:03 lidel

Yup- that’s what I did in the end- but if support for this project is on hold I might move to an alternative c# library.

Baaleos avatar Mar 01 '21 17:03 Baaleos

@Baaleos can you recommend an alternative and actively maintained client library for .NET/C# that we could link to from https://github.com/ipfs/ipfs/#http-client-libraries? Right now both C# libs listed there seem to be abandoned.

lidel avatar Mar 02 '21 23:03 lidel

Really this project just needs someone to pick it back up. Ideally someone with write access to the repo and the ability to push to nuget.

An active fork would do just as well, but visibility would be poor if the author doesn't (or can't) link to a maintained version.

@richardschneider You still around buddy?

Arlodotexe avatar Dec 15 '21 05:12 Arlodotexe