libp2p / go-libp2p-examples

Example libp2p applications
MIT License
339 stars 145 forks source link

routed-echo example: invalid character '-' after top-level value #205

Open driemworks opened 3 years ago

driemworks commented 3 years ago

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