ipfs-shipyard / java-ipfs-http-client

A Java implementation of the HTTP IPFS API
MIT License
538 stars 243 forks source link

Server returned HTTP response code: 405 for URL: http://127.0.0.1:5001/api/v0/version #162

Closed MangKyu closed 4 years ago

MangKyu commented 4 years ago

IPFS method does not support GET Method. When i tried to initialize IPFS Object, it occurs an error like below

`Exception in thread "main" java.lang.RuntimeException: IOException contacting IPFS daemon. Trailer: null 405 - Method Not Allowed

at io.ipfs.api.IPFS.get(IPFS.java:683) at io.ipfs.api.IPFS.retrieve(IPFS.java:662) at io.ipfs.api.IPFS.retrieveAndParse(IPFS.java:624) at io.ipfs.api.IPFS.version(IPFS.java:572) at io.ipfs.api.IPFS.(IPFS.java:69) at io.ipfs.api.IPFS.(IPFS.java:45) at Main.main(Main.java:15) Caused by: java.io.IOException: Server returned HTTP response code: 405 for URL: http://127.0.0.1:5001/api/v0/version at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) at io.ipfs.api.IPFS.get(IPFS.java:671) ... 6 more`

red0bear commented 4 years ago

Got exact same problem with last version version ipfs

IslandGray commented 4 years ago

Yes, i got same problem. Please using POST method instead GET

FultonBrowne commented 4 years ago

same here and I need to work for a big deadline

Gxz-NGU commented 4 years ago

same here

NDCFL commented 4 years ago

确实最新版本的出现了405

odisseus commented 4 years ago

This seems to be a duplicate of #157. See the details of that issue for the explanation.

To everybody affected by this issue, my advice is to keep using IPFS 0.4.x until this library gets updated.