I wanted to develop one HTTP example on win32 platform, which is asynchronous.
I am new to win32 programming, what are the api and library win32 platform provides for HTTP send and receive request? I am using Windows XP with VS 2005.
If any example is available please provide a link to it.
You can use WinHTTP library. Here is an sample on Asynchronous completion.
Generally I'd recommend something cross-platform like cURL, POCO, Qt, or Asio (pretty modern and nice). However, here is a Windows example using
IXMLHTTPRequest
:Boost Asio is a nice synchronous/asynchronous library which has everything you need for HTTP servers/clients. It has some extensive examples on HTTP servers, and the relevant clients. Now if you are new to C++ in general this library may be a little cryptic. You could always go have a look at MSDN if you want a more from scratch approach.
Window HTTP Services "provides developers with an HTTP client application programming interface (API) to send requests through the HTTP protocol to other HTTP servers."
HTTP Server API "enables applications to communicate over HTTP without using Microsoft Internet Information Server (IIS)"
This is an example
https://github.com/pedro-vicente/lib_netsockets
A C++ light wrapper for POSIX and Winsock sockets
It uses HTTP GET to retrieve a file from a web server, both server and file are command line parameters. The remote file is saved to a local copy.