views:

301

answers:

1

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
A: 

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...

RyanWilcox
I'm beginning to find that out.
George Edison