six-ddc / plow

A high-performance HTTP benchmarking tool that includes a real-time web UI and terminal display
Apache License 2.0
4.13k stars 140 forks source link

feat: default to POST instead of GET when body is given #73

Closed FlorianLoch closed 1 year ago

FlorianLoch commented 1 year ago

I am not sure checking whether method has actually been set might be too much - using GET with a body probably never makes sense, so one could probably also set it to POST even if GET has been set explicitly? 🤔

On the other hand, this also covers the case of a user explicitly using another, legit, method.

FlorianLoch commented 1 year ago

Closes #72.

six-ddc commented 1 year ago

Although it is not common for GET requests to have a request body, it should be considered permissible.

six-ddc commented 1 year ago

LGTM

FlorianLoch commented 1 year ago

Although it is not common for GET requests to have a request body, it should be considered permissible.

Alright, then the currently suggested implementation should match that. Just double checked, should be fine.

Just noticed the help string of the body parameters was a little hard to read - added a commit suggesting an improvement. For ease of workflow I simply (ab)used this PR for it ;)