Good lightweight library for HTTP POST/GET for C?

2019-03-27 04:49发布

I'm planning of creating a Last.FM scrobbler plugin for a music player in Windows. Last.FM submissions API relays on HTTP/1.1 GET and POST.

I've never done Internet oriented programming and I've still to know about the HTTP protocol but I'd like to start playing around with it sending and getting some data. I've looked at the Winsock interface but I don't know if it would be better to use any easier thing.

Do anyone of you know how could I do it? What could I use?

If so, could you point me to a tutorial too?

If it's a library it would be good that I can link statically to it, I would want to supply only the DLL of the plugin.

4条回答
兄弟一词,经得起流年.
2楼-- · 2019-03-27 05:11

This is an old thread but in case this helps anyone else:

Use libCurl http://curl.haxx.se/libcurl/c/simplepost.html

This is the easiest way I've found of doing a quick http post or get

查看更多
The star\"
3楼-- · 2019-03-27 05:12

libghttp is pretty lightweight.

Im unsure if it will compile cleanly on win32 though.

查看更多
我命由我不由天
4楼-- · 2019-03-27 05:15

Windows comes with WinHttp, which does support GET and POST.

查看更多
我欲成王,谁敢阻挡
5楼-- · 2019-03-27 05:24

LibCurl is one of the most widely used and most portable.

查看更多
登录 后发表回答