Last active
December 16, 2015 03:59
-
-
Save pauladam/5373806 to your computer and use it in GitHub Desktop.
curl_easy_escape tester.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <curl/curl.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| CURL *curl; | |
| CURLcode res; | |
| char *ch; | |
| int length = 0; | |
| curl = curl_easy_init(); | |
| ch = (char*) curl_easy_escape(curl, argv[1], 0); | |
| printf("%s", ch); | |
| printf("\n"); | |
| return 0; | |
| } | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$: gcc -lcurl -o curl-easy-escape-test curl-easy-escape-test.c
$: ./curl-easy-escape-test "param data \0\0\0"
param%20data%20%5C0%5C0%5C0