richardschneider / net-ipfs-http-client

InterPlanetary File System client for .Net (C#, VB, F# ...)
MIT License
158 stars 52 forks source link

Support for go-ipfs v0.5 #62

Open lidel opened 4 years ago

lidel commented 4 years ago

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 
CmdrKeen commented 4 years ago

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?

lidel commented 4 years ago

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

cburnette commented 4 years ago

@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.

OscarPDR commented 4 years ago

@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...

Baaleos commented 3 years ago

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.

lidel commented 3 years ago

@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?

Baaleos commented 3 years ago

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.

lidel commented 3 years ago

@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.

Arlodotexe commented 2 years ago

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?