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
Many other HTTP libraries provide a session abstraction as a way of carrying state (i.e. cookies) between requests, potentially across different origins (e.g. following redirects).
I that the session objects might allow us to make HTTP::Client thread-safe (see socketry/async-io#17). Currently I would not expect that HTTP::Client caches the @connection object without looking at it; and I still assumed that it's not, even though I'm very familiar with http.rb codebase by now. But with session objects it would be obvious that the HTTP::Client is (hopefully) immutable, while HTTP::Session uses the same connection.
Activity
janko commentedon Nov 18, 2018
I that the session objects might allow us to make
HTTP::Clientthread-safe (see socketry/async-io#17). Currently I would not expect thatHTTP::Clientcaches the@connectionobject without looking at it; and I still assumed that it's not, even though I'm very familiar with http.rb codebase by now. But with session objects it would be obvious that theHTTP::Clientis (hopefully) immutable, whileHTTP::Sessionuses the same connection.Introduce HTTP::Session for thread-safe request building
Introduce HTTP::Session for thread-safe request building