On Wed, 19 Jan 2011 14:22:06 +0530
DEXTER MCCONNELL <[email protected]> wrote:

> Hi,
> 
> Does tntnet support http requests, similar to the functionality
> provided by libcurl for c++ ?
> 
> 
> Dexter

#include <cxxtools/httprequest.h>
#include <cxxtools/httpreply.h>

int main() {
    cxxtools::HttpRequest request("http://www.tntnet.org/";);
    cxxtools::HttpReply reply(request); // this does the actual request
    // print the reply:
    std::cout << "the server returned the http-code " <<
    reply.getReturnCode() << '\n' << "The body is: " <<
    reply.rdbuf() << std::endl; // note that printing a
    // std::streambuf returned by reply.rebuf() copies the source
    // to the ostream.
}

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to