source:
testjes/curlescapetest.cpp
Last change on this file was 10, checked in by willem, 11 years ago | |
---|---|
File size: 338 bytes |
Line | |
---|---|
1 | #include <iostream> |
2 | #include <curl/curl.h> |
3 | #include <string> |
4 | int main() |
5 | { |
6 | std::string a; |
7 | a = "abc/d"; |
8 | CURL *b; |
9 | b = curl_easy_init(); |
10 | char *c; |
11 | int l=0; |
12 | c=curl_easy_escape(b,a.c_str(),l); |
13 | std::cout << "c:" << c << std::endl; |
14 | char *d; |
15 | d=curl_easy_unescape(b,c,0,&l); |
16 | std::cout << "d:" << d << std::endl; |
17 | return 0; |
18 | |
19 | } |
Note: See TracBrowser
for help on using the repository browser.