eidheim / Simple-Web-Server

A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.
MIT License
2.61k stars 751 forks source link

Http client with partial results #227

Closed Type1J closed 6 years ago

Type1J commented 6 years ago

I have a large dynamically generated file that I want to parse as it's being downloaded. I have a parser hooked to a downloader that I wrote directly in asio, but since it's an http request, I'd like to rewrite it to be more maintainable. However, I'm not sure how to get the SimpleWeb::Client to yield partial results. I'd like an example, but I'd be happy with a comment here describing what to do. Thanks!

eidheim commented 6 years ago

Since the client waits for the entire request/response to finish before you can process the response, you have to make your own modifications this this library for this particular use case.

Type1J commented 6 years ago

Ok