PDA

View Full Version : Simple HTTP library


EyeballKid
05-09-2006, 08:39 AM
Hi all,
I've written a small C++ library for issuing HTTP requests and handling responses as they come back.

I wrote it to implement a online high score table for a game.
I figured maybe someone else would find it useful, so I've released it under the zlib/libpng license.

Features


Simple to integrate - just drop in the .h and .cpp files
Non-blocking operation (for use in update loops)
Supports pipelining. You can issue multiple requests without waiting for responses.
Licensed under the zlib/libpng license.
Cross-platform (I've tested it on OSX, Linux and Windows)


Homepage: http://www.scumways.com/happyhttp/happyhttp.html

Feedback welcome!

Mike Boeh
05-09-2006, 02:35 PM
Hey that's cool... The need for this has come up here a few times, and the standard response is "use wininet". Nice to see a simple cross platform one :)

mahlzeit
05-09-2006, 03:03 PM
and the standard response is "use wininet"
I though the standard response was "use libcurl". ;) Alternatives are always good, of course.

Hamumu
05-09-2006, 08:00 PM
My feedback would simply be two things from your todo list: Get in that proxy support, and get out that STL! Proxies are what my own web code doesn't handle, so that'd be very nice for me. STL is simply something I don't have or ever want to bear witness to. Looks good though!

EyeballKid
05-10-2006, 03:50 AM
My feedback would simply be two things from your todo list: Get in that proxy support, and get out that STL! Proxies are what my own web code doesn't handle, so that'd be very nice for me. STL is simply something I don't have or ever want to bear witness to. Looks good though!

Yep, proxy support is first on my list!

However, I probably won't get around to removing the STL usage for a long time - my projects all use STL and I'm happy using it.
But I'd be more than willing to accept patches to move it! HappyHTTP certainly doesn't absolutely rely on STL, it just made development a lot quicker and easier.

That said - the STL use is hidden down inside the implementation, and the public interface doesn't expose it. As a user of the library you wouldn't even know it's there...