HttpStream


Abstract: A BDataIO that retrieves its data from the Web.

This class attempts to make it relatively easy to retrieve data from the World Wide Web. It is based largely on Python's httplib. Here is an example of its usage:
HttpStream h( "www.beunited.org" );
char buffer[ 512 ];
h.PutRequest( "GET", "/index.html" );
h.PutHeader( "Host", "www.beunited.org" );
h.PutHeader( "Accept", "text/html" );
h.PutHeader( "Accept", "text/plain" );
h.EndHeaders();
h.GetReply();
cout << h.GetCode() << endl;  // should be 200
h.Read( buffer, 512 );


© 2000 BeUnited — (Last Updated 5/10/2000)