You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ae63ab4
Browse filesBrowse the repository at this point in the historyBrowse files
Let the result readers read the response body directly
HttpResponse was a std::istream only to keep the reader interfaces from
the Poco days, and AmortizedIStreamReader was the only consumer, reading
through rdbuf() into a buffer of its own. Both ends are driver code now,
so HttpResponse provides the three operations the format parsers need,
eof(), get() and read(), with inline fast paths over the buffered data,
and the parsers take an HttpResponse reference.
This removes a copy of every byte of the body and AmortizedIStreamReader,
as well as the std::ios specifics this needed: the exception mask to get
errors out of std::istream, the ambiguous traits_type of the multiple
stream bases, and the construction order of the virtual base. Errors are
thrown from eof(), get() and read(), and again from every later call.
0 commit comments