Reputation: 73215
Im really stumped. Im using the wxHTTP class in wxWidgets to try and download two files. The first request succeeds but the second one fails when wxHTTP->GetInputStream is called. Between downloads, the wxInputStream from the first call is freed. Any ideas?
Edit - Here is some pseudocode:
wxHTTP * http = new wxHTTP();
// connect to www.example.com
wxInputStream* in = http->GetInputStream(wxT("page"));
// read data
delete in;
// repeat last two lines with new url
Upvotes: 0
Views: 1282
Reputation: 13972
Short answer? It's usually easier to use wxCurl or Boost's asio functions to do this kind of thing. wxHTTP has bitten me a few times...
Upvotes: 0