Open kundadebdatta opened 2 months ago
What does this mean? Gateway uses HTTP 1.1, Thin Client HTTP/2? Why would you want to reuse the same client - isn't like you would ever use both?
What does this mean? Gateway uses HTTP 1.1, Thin Client HTTP/2? Why would you want to reuse the same client - isn't like you would ever use both?
Agreed. Idea is to analyze if we could still leverage the CosmosHttpClient
for both gateway and thin client. The CosmosHttpClient
is a wrapper around the underlying HttpClient
. This task is just for place holder for now to analyze if this can be done more optimally.
After initial investigation: HttpClient is capable of handling both Http1.1 and Http2.0 protocol. While sending the HttpRequestMessage it can specify the HttpVersion.Version20. This way same httpClient can be used for Gateway Mode or Thinclient mode.
HttpClient
is capable of handling bothHttp1.1
andHttp2.0
protocol. Request will decide which protocol to use (Request can opt for Http2.0 explicitly).Therefore, ideally it should be possible to share the same client with both the (Gateway and Thin Client) store models.