Transport-agnostic HTTP client?


Currently HTTP client is hard bound with an internal tcp/tls socket. What’s your view on making it possible to reuse HTTP code with any IO classes for transport? Something like:

def initialize(istream : IO, ostream : IO)
def initialize(iostream: IO)
  initialize(iostream, iostream)

Personally I don’t need it right now, but I can very well imagine a number of usecases where it would be very helpful, for example multi-protocol sockets or IPC with HTTP inside or just manual management of TCP/TLS sockets.