The docs for the HTTP API states “In fact, the ipfs CLI commands use this API when operating in online mode.”
Is there a way to have the CLI display the HTTP request (full URL + query string) as well as the HTML POST body generated by the command?
If not, it would be great if a CLI option could be added that prints out that info. This will greatly help those of us that are trying to use the HTTP API to build a bridge from environments other than Go and Javascript.
Wireshark is a network inspection tool, it can be used by hackers to eavesdrop for example.
So you run wireshark, and you will be able to see the HTTP calls made on your machine (be sure to bind on loopback).
A filter like tcp.port == 5001 && http should help you filter for the IPFS api.
My tip is eavesdrop yourself, that would show you the API calls. (I know it’s more hacky than something built in, but that also far less efforts)
It’s not a hacking tool, it’s a software debugging tool.
I’m sorry if you are banned to use wireshark, but wireshark is just a tool, it’s a hacking tool if you use it to hack, it’s a debugging tool if you use it to debug things.
Thanks for the suggestion. I’ve started “reverse engineering” using curl --verbose where possible.
There are a few places where the documentation is unclear. Here are a couple examples:
block/rm docs suggest it can be used to remove multiple blocks but it is unclear how the multiple block hashes are passed.
Similar suggestion in the docs for cid/base32 (“Convert CIDs to Base32”)
Docs for cid/format do not identify the default values for the ‘v’ and ‘codec’ arguments
Doc for config/edit suggest it can be used to edit the config. How is that possible through the HTTP API?
I don’t mind digging deep into the docs. Since I don’t “speak” Go or Javascript (I primarily work on back-end/library/driver projects) the source is not a lot of help.