cURL / Mailing Lists / curl-users / Single Mail

curl-users

--data-encode

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 31 Oct 2007 11:10:49 +0100 (CET)

Hey

I've pulled out an old patch I worked on ages ago, and I thought I'd freshen
it up and perhaps commit if I can get it sensible...

I'm writing this in the hope that you'll provide some feedback on the
syntax/usage of this new option.

The --data-encode option will do URL encoding of _parts_ of the given string
so that you can easier write a script that posts data to a web site. The usage
is currently like this:

   --data-encode name=content

     curl will then encode the content part and send this on like
     name=urlencoded-content

It also supports getting the content part from a file, so that you can instead
write it like this:

   --data-encode name_at_filename

     curl will then read the contents from the given file and then encode it
     and use it like this: name=urlencoded-file-contents

You can of course mix --data, --data-binary and --data-encode on a command
line and you can use any number of either one of them just like before.

Good/bad? Any obvious cases where we can improve this? Any obvious cases where
this is not good enough?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-10-31