..
POST Only in ipfs
印象中 ipfs 把一些 API 改成 POST 方式了,去 CHANGELOG 找了找,如下
0.5.0 2020-04-28
POST Only
IPFS has two HTTP APIs:
Port 5001: http://localhost:5001/api/v0/... - the API
Port 8080: http://localhost:8080/api/v0/... - a read-only subset of the API, accessible via the gateway
As of this release, the main IPFS API (port 5001) will only accept POST requests. This change is necessary to tighten cross origin security in browsers.
If you're using the go-ipfs API in your application, you may need to change GET calls to POST calls or upgrade your libraries and tools.