views:

156

answers:

4

Hi, 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.

+3  A: 

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

Daniel A. White
Thank you very much! Defining HTTP_ONLY becomes a lightweight alternative to have in mind (200KB).
Markus R.
A: 

You could use a command line utility like wget that will do the HTTP/POST communication for you, and create an IPC pipe between your process and wget to read the output from the HTTP response.

Blagovest Buyukliev
A: 

libghttp is pretty lightweight.

Im unsure if it will compile cleanly on win32 though.

joveha
Nope, it doesn't compile easily on win32 but thanks anyway!
Markus R.
A: 

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

ephemient
Thank very much! Right now I'm thinking about using WinHTTP or libcurl.
Markus R.