elixir-plug / plug

Compose web applications with functions
https://hex.pm/packages/plug
Other
2.88k stars 586 forks source link

Allow creating HTTP/2 (or later) via Plug.Test.conn #1036

Closed hauleth closed 3 years ago

hauleth commented 3 years ago

While working on PlugEarlyHints I needed to create test HTTP/2 sessions for my tests (this plug ignores HTTP/1.1 requests as not all clients may be conforming to the later specs where there can be more than one response sent). To do so I needed to create my own module that uses internal API just to return HTTP/2 session. This should be available via 4th option to the Plug.Test.conn where we could specify additional features of the adapter (like HTTP version used).

hauleth commented 3 years ago

NVM, just found it is possible.