Image into a container

May 6, 2015 at 3:22 AM
Hi I have implemented twitter into my game. I need to get images from twitter and at the moment I am downloading them. I was wondering if there is a way to put them into a container rather than downloading them.

May 6, 2015 at 3:24 AM

Hi Mark,

What do you exactly mean by ‘put them into a container’?


May 6, 2015 at 3:25 AM
Like into a vector container to be able to call them in my game.

May 6, 2015 at 4:30 PM
You could use a container_stream backed by a std::vector or std::string. Then pass that to http_request::set_response_stream(...) before sending out the request. The HTTP response body will then be written into that stream you've provided which is backed by your STL container.