Listing 1. Making an HTTP GET Request

HTTP_Response hResponse;
hResponse = "http://kernel.org/",
                          "", kHMethodGet );

// now you can check hResponse.lSize to see if
// anything was allocated. Don't forget you must free
// any memory as the caller!

// might want to check szHCode and szHMsg members as well

if( (hResponse.lSize > 0) && (hResponse.lError != 0) )
{
    // process data
    // don't forget to free allocations!
    if( hResponse.pData ) free( hResponse.pData );
}
else
{
    // handle error
}