View in context in the libbitcoin Slack #general mirror.
write_line(string, terminator) also now added to the stream writers. Simplifies creation of the http response line, headers, and body. Also created request and response objects to encapsulate each. The request is passed via the notification mechanism (like p2p messages), along with the message (request body), which determines the notification type. This gives the handling protocol(s) direct access to the request while maintaining loose coupling and statelessness. The response object is constructed passed when a message is sent (response body).
http request/response only applies to html and json-rpc (Core compat) protocols, as well as the first message in a WebSocket upgrade. Others, including Stratum (vs/v2) and Electrum are just JSON over TCP - no http request/response. So those just skip the request/response serialization but are otherwise the same.