All pastes #537137 Raw Edit

Untitled

public cpp v1 · immutable
·published 2007-06-04 17:14 UTC
rendered paste body
// Searching googleHTTPSocket http;HTTPSocket::Parameters params;params.push_back(std::make_pair(L"q", L"secret sauce"));        http.get(L"www.google.se", 80, params, HTTPRequest(L"/search"));while(!http.wasAborted() && !http.hasCompleteResponse())    http.tick();// Posting a fileHTTPFile file(L"somefile.txt", HTTPFile::MimeTextPlain);HTTPSocket::Files files;files.push_back(std::make_pair(L"myfile", file));http.post(L"www.dius.org",           80,          HTTPSocket::Parameters(),          files,          HTTPRequest(L"/filetest.php"));while(!http.wasAborted() && !http.hasCompleteResponse())    http.tick();