开发者

Sending http and https requests from C/C++

开发者 https://www.devze.com 2023-03-27 01:51 出处:网络
Is there any other variants to send http/https request from C/C++ except using libCurl? I can\'t figure ou开发者_运维百科t how to use libCurl with OpenSSL :( I want to interact with YoutubeAPI.SFML ha

Is there any other variants to send http/https request from C/C++ except using libCurl? I can't figure ou开发者_运维百科t how to use libCurl with OpenSSL :( I want to interact with YoutubeAPI.


SFML has a nice, simple to use in-built HTTP implementation. You can find a tutorial here. It looks to me that for youtube you can simply use POST - look here.


Perhaps these two examples will be of help to you?

http://curl.haxx.se/libcurl/c/https.html

http://curl.haxx.se/libcurl/c/simplessl.html


You didn't say on which platform.

On windows there is also the WinInet-API which handles ssl transparently and uses the windows-built-in-certificates:

http://msdn.microsoft.com/en-us/library/aa384233%28VS.85%29.aspx

libcurl is imho a much friendlier API though.


there are alot of c++ libs out there to do that, anyways I agree that libCurl is one of the easiest and most lighweight solutions, and thus i'd recommend using it. If you want to look for an alternative anyways you might want to check out poco: http://pocoproject.org/

0

精彩评论

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

关注公众号