Why the quoting is the actual point of this tool#
Building a curl command by hand is mostly typing; getting the shell quoting right is the part that actually goes wrong. A JSON body pasted straight into a terminal without quotes gets torn apart by the shell at every space and special character. Wrapping it in single quotes fixes that — except if the body itself contains an apostrophe, which single quotes cannot escape from the inside at all. The correct fix is closing the quote, inserting an escaped literal quote, and reopening it ('…'\''…'), which is exactly what this tool generates automatically for any value that needs it.
Why the body doesn't show up for a GET request#
curl accepts -d on any method, but a GET request with a body is unusual enough that most HTTP servers and libraries either ignore it or reject it outright — the semantics of GET explicitly don't include a request body in the HTTP spec. This tool leaves the body out for GET and HEAD specifically to avoid generating a command that looks reasonable but does not behave the way most servers expect.
Bearer versus Basic: two different auth mechanisms, two different flags#
Bearer auth is just a header (Authorization: Bearer <token>) — nothing curl-specific about it, so this tool adds it as a plain -H flag alongside any other headers. Basic auth is different: curl has a dedicated -u user:pass flag that handles the base64-encoding curl needs internally, so this tool uses that flag rather than trying to construct the Authorization: Basic header by hand.