Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 1
    What if msg = '=' ? Commented Oct 15, 2015 at 9:14
  • From curl doc: Note that the name part (msg in this case) is expected to be URL-encoded already. Also you can specify something like --request DELETE and it would indeed be a delete method instead of a GET. Not sure if order matters. Commented Feb 3, 2016 at 0:21
  • @damphat what happens when the request has two parameters like "msg1=Hello&msg2=World"? This will encode the & between the parameters which would mean wrong thing to send to the server Commented Jul 28, 2016 at 13:08
  • 12
    @GaneshSatpute: use multiple --data-urlencode parameters, one for each key-value pair. Commented Aug 9, 2016 at 13:04
  • 2
    Is it possible to perform query params url-encoding for a POST request and provide a payload ? Commented May 2, 2019 at 17:08