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
With the deprecation notice at http://golang.org/pkg/net/http/httputil/#NewClientConn
it would be good to have client-side HTTP hijack support in a supported way.
Current RoundTripper etc force a request-reply cycle. I'm not sure what the ideal API
would look like; for my current use case, calling a hypothetical Response.Hijack before
reading Response.Body would be enough -- but I can see others arguing they'd like to be
in charge of reading the response headers too.
Related, it would be nice to be able to interact with the connection pool. Imagine
talking a back-and-forth protocol as a consequence of a HTTP request, concluding that
conversation, leaving the connection open, and letting the next HTTP request use it.
This applies both on the client and server side. (Ugly workarounds: a fake Listener for
server-side, that returns the previously-hijacked connections from Accept; for
client-side, a Dialer that does a non-blocking receive on a recycle channel first,
falling back to normal Dial if none are there -- this would duplicate the
connectMethodKey logic in net/http.)
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: