forked fromglynos/cpp-netlib
- Notifications
You must be signed in to change notification settings - Fork425
Closed
Description
I have a strange issue when reusing existing response object. The code is like this:
http::client::requestreq(some_path);req << net::header(...);http::client::response resp = m_client.get(req);//now status(resp), headers(resp), resp.body() will block and return correct datareq = http::client::request(some_other_path);req << net::header(...);resp = m_client.get(req);//now headers(resp), resp.body() return data from previous response!
when I change the last line to this:
http::client::response resp2 = m_client(req);
it will work.
What is the deal here? I would like to reuse same response object as I run requests in parallel and store responses in a single vector. Each iteration on the vector parses previous responses and sends new requests.
My environment:
cpp-netlib 0.11-1-final.zip
boost_1_57_0
VS2013
Win7 x64
Metadata
Metadata
Assignees
Labels
No labels