Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Reusing http::client::response #552

Closed
@tpecholt

Description

@tpecholt

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp