go-libp2p-examples
go-libp2p-examples copied to clipboard
routed-echo example: invalid character '-' after top-level value
When running the routed-echo example with the "global" flag set to false, the local ipfs daemon returns a 405 when http://localhost:5001/api/v0/id
is invoked using http.Get
. The endpoint should be called with POST.
ex:
resp, err := http.Post(LOCAL_PEER_ENDPOINT, "application/json", nil)
https://github.com/libp2p/go-libp2p-examples/blob/d4f3f358ab266fa2a1c3788dd8086929fb6bbf50/routed-echo/bootstrap.go#L46
IPFS API Doc https://docs.ipfs.io/reference/http/api/#api-v0-id