samueleresca commented on issue #484: URL: https://github.com/apache/pekko-http/issues/484#issuecomment-2018926929
I was taking a look at this. `Http().singleRequest(...)` a.k.a [Request-Level Client-Side API](https://pekko.apache.org/docs/pekko-http/current/client-side/request-level.html) uses a connection pool (see: [PoolInterface](https://github.com/apache/pekko-http/blob/main/http-core/src/main/scala/org/apache/pekko/http/impl/engine/client/PoolInterface.scala#L49)) to reuse connections. In order to expose an single request Http2 API(i.e.:`Http2().singleRequest(HttpRequest(uri = "http://localhost"))`) and keeping the same behavior of `Http().singleRequest` I think we can proceed as follow: - Create an `Http2` extension similar to the [Http extension](https://github.com/apache/pekko-http/blob/b6263de8c5582e096bfc5cdd969576d8de438237/http-core/src/main/scala/org/apache/pekko/http/scaladsl/Http.scala#L68) with the `** CLIENT **` and `** CONNECTION POOL **` sections. - Update the the the [PoolInterface connection flow](https://github.com/apache/pekko-http/blob/main/http-core/src/main/scala/org/apache/pekko/http/impl/engine/client/PoolInterface.scala#L76) to handle both `Http` and `Http2` Is my understanding / approach right here? Tagging explicitly @raboof as I saw his name in some of the files involved in the changes + some HTTP/2 related work. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
