Skip to content

HTTPClientSession.receiveResponse: how to properly keep the istream in my class ? #4658

@lzanoni-stm

Description

@lzanoni-stm

Hello,

I'm have to keep the istream returned from HTTPClientSession.receiveResponse() as a member of my class (I read content from callbacks).

I've trouble finding the correct way of declaring the variable:

I tried with a Poco::SharedPtrstd::istream m_ansresponse;
and the m_ansresponse=&(httpclient.receiveResponse(response);

but after the d'tor of my class is done (apparently calling the release of the SharedPtr m_ansresponse), I get a crash in the d'tor of HTTPClientSession, also deleting the SharedPtr.

What's the correct way of doing this ?

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