dukeofharen / httplaceholder

A very flexible cross platform HTTP stub application.
MIT License
113 stars 4 forks source link

bug: Small bug in parsing cURL command for creating stub #365

Open dukeofharen opened 2 months ago

dukeofharen commented 2 months ago

When passing the following cURL command for creating a stub, the “form” handler works correctly:

curl 'https://api.site.com/request-path' \
  -d 'param1=value1&param2=value2' \
  --compressed

When passing the following cURL command for creating a stub, the “form” handler ONLY recognizes the first posted form value (in this case “param1=value1”). It should recognize both.

curl 'https://api.site.com/request-path' \
  -d 'param1=value1' \
  -d 'param2=value2' \
  --compressed

Perhaps, before converting the cURL command to a “request” model, the command needs to be parsed into an intermediate value?