20 May
2017
20 May
'17
2:04 p.m.
On Sat, May 20, 2017 at 3:12 AM, Bjorn Reese via Boost
When I perform an asynchronous HTTP operation that returns an error_code then I prefer that the error_code contains a unified response, i.e. an HTTP status code, a system error code (e.g. network problem), or an internal library error code.
A nice thing about HTTP (if there is any such thing) is that the HTTP "message" can be modeled as a self contained object. The low-level result of the asynchronous operation (for example boost::asio::error::connection_reset) reflects metadata about the HTTP message and should not be part of that container.