开发者

how to upload a file using libcurl in c

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜