curl-library
Special characters encoding in a post HTTP request
Date: Mon, 16 Jul 2001 10:04:20 +0200
Hello,
I use curl to create HTTP requests:
http://hostname:port/servletname/param1=value1¶m2=value2....paramN=value
N
I create the parameter list of the request as a string: paramString =
"/servletname/param1=value1¶m2=value2...paramN=valueN"
and I call the following method:
curl_easy_setopt(mySession, CURLOPT_POSTFIELDS, paramString)
Is it a convenient method in curl for convert for converting a String into a
MIME format called "x-www-form-urlencoded" format ?
This method must do the following :
* The ASCII characters 'a' through 'z', 'A' through 'Z', and '0'
through '9' remain the same.
* The space character ' ' is converted into a plus sign '+'.
* All other characters are converted into the 3-character string
"%xy", where xy is the two-digit hexadecimal representation of the lower
8-bits of the character.
Regs
Gwen
_______________________________________________
Curl-library mailing list
http://curl.haxx.se/libcurl/
Received on 2001-07-16