HTTPClientSession.receiveResponse: how to properly keep the istream in my class ? #4671
Unanswered
lzanoni-stm
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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 ?
Beta Was this translation helpful? Give feedback.
All reactions