Notice
Recent Posts
Recent Comments
준호씨의 블로그
한달넘게 기다린 드래곤길들이기 인형. 투스리스, 라이트퓨리
https://youtu.be/PCBVMnH17VM
살아가는이야기
2019. 4. 29. 00:45
c - libcurl 로 쉽게 url encoding 하기. curl_easy_escape
url 을 만들 때 공백(' ')은 %20 으로 바꿔준다던지 처리를 해 주어야 한다. libcurl 의 curl_easy_escape 함수를 이용하면 손쉽게 처리 할 수 있다. #include #include #include int main() { CURL *curl = curl_easy_init(); if (curl) { char *string = "hello world"; printf("%lu\n", strlen(string)); // 11 char *output = curl_easy_escape(curl, string, strlen(string)); if (output) { printf("Encoded: %s\n", output); // Encoded: hello%20world curl_free(o..
개발이야기
2019. 4. 24. 20:34