Problem
The -d flag description is copied from curl:
-d, --data string Sends the specified data in a POST request to the HTTP server
But unlike curl, the method is not switched — it stays GET unless -X is passed.
Reproduction
$ http-assert -d 'hello=1' --assert-ok http://127.0.0.1:8791/echo
[.] HTTP/1.1 GET http://127.0.0.1:8791/echo ← GET, with a body
…
{"method": "GET", "body": "hello=1", …}
Why it matters
A GET with a request body is legal but almost never what the user meant, and the help text actively promises otherwise.
Suggested fix
Pick one and make the docs match:
- Match curl — default the method to
POST when -d is supplied and -X is not; or
- Keep the current behaviour and fix the help text to
Send the specified data as the request body.
Option 1 matches user expectation; option 2 is the smaller change.
Problem
The
-dflag description is copied from curl:But unlike curl, the method is not switched — it stays
GETunless-Xis passed.Reproduction
Why it matters
A GET with a request body is legal but almost never what the user meant, and the help text actively promises otherwise.
Suggested fix
Pick one and make the docs match:
POSTwhen-dis supplied and-Xis not; orSend the specified data as the request body.Option 1 matches user expectation; option 2 is the smaller change.