cURL Mailing List Monthly Index Single Mail
curl-users Mailing List Archives
url-encoding of POSTed data?
From: Roth, Kevin P. <KPRoth_at_MAPLLC.com>
Date: Tue, 18 Nov 2003 16:25:08 -0500
I notice that curl.exe has no option (at least none that I can find) to tell it to url-encode POST data. So, for example, I can't do this:
$ curl.exe --data "Field1=Some Value" <url>
and have the embedded spaces properly preserved all the way through to the ASP page which receives them. With an IIS web server, it seems that the spaces are being stripped out, even though I know curl sent them (I could see them in a --trace-ascii).
Now, I realize that I can manually url-encode this string, as in:
$ curl.exe --data "Field1=Some+Value" <url>
and have it work as expected. But sometimes it's not very pleasant or easy to do the url-encoding myself. Yes, I know there are lots of ways to call a urlencode function, but there are times when it would be nice not to have to hook one up...
Would anyone oppose seeing a new command-line option added, such as this:
--data-encode <data> A single POST param, to be url-encoded (H)
If the data starts with the letter @, the rest will
If the data includes an @ sign in place of the usual
Similar to -d/--data, except that --data-encode
The -G/--get option will turn this into a GET or
If this option is used several times, the ones fol-
Daniel: if you have time to code this up, it would be much appreciated. Otherwise, I'll probably get around to it eventually. At the moment, I just wanted to get this idea documented and ask for some feedback.
These mail archives are generated by hypermail.
Page updated November 12, 2010.
web site info