Closed lucindo closed 7 years ago
Sounds good to me, please be aware of the other PR's in flight such as #35 and #20.
If implemented, shouldn't there be a way to avoid the special interpretation of @
character. If I look at curl(1), there's a few alternatives to -d
:
--data-binary
--data-raw
--data-urlencode
Where --data-raw
is the one to avoid that. Also being able to urlencode parameters before posting could be useful as well.
According to the manual, using -d
also sets Content-Type to application/x-www-form-urlencoded
. And using -d
implies POST
method if none is set.
Urgh. I'm starting to change my mind here, I don't want all those flags, the combinational explosion of their interactions means having to write a functional test harness, rather that the nice simple "did it work or did it fail" tests we have now.
-d @filename
is the limit, no more. Thank you.
If you need more than that you'll have to explain why you cannot just use curl instead.
Hi,
curl(1)
let you post data from files using-d @filename
. I use it all the time missed this feature when working withhttpstat
.If you think this is a relevant addition I can make a pull request.
The changes I made for this to work are here: https://github.com/lucindo/httpstat/commit/87c4d32f548248dcbe11d3501b4ed706656474fe