开发者

how to upload a file using libcurl in c

开发者 https://www.devze.com 2023-03-11 03:58 出处:网络
I am building an application and I want it t开发者_StackOverflow社区o upload a file using http . I am doing this using libcurl.I would like someone to give an example on how to upload a file, either i

I am building an application and I want it t开发者_StackOverflow社区o upload a file using http . I am doing this using libcurl. I would like someone to give an example on how to upload a file, either in c using lib curl. Thanks in advance!


See the file upload example in the cURL docs and change the protocol from file to whatever you want to use: http://curl.haxx.se/libcurl/c/fileupload.html. Note that CURLOPT_UPLOAD will send a PUT request when doing HTTP.

Or check out the FTP upload example: http://curl.haxx.se/libcurl/c/ftpupload.html

0

精彩评论

暂无评论...
验证码 换一张
取 消