Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to consume both of REST and gRPC services from the console client of the gRPC demo sample #4062

Closed
hikalkan opened this issue May 23, 2020 · 3 comments · Fixed by abpframework/abp-samples#17

Comments

@hikalkan
Copy link
Member

hikalkan commented May 23, 2020

I created the sample: https://github.com/abpframework/abp-samples/tree/master/GrpcDemo

It works. However, we have a problem: Microsoft document leads to make the server to support HTTP/2. However, client application can not call REST endpoints in this case. I couldn't be able to configure all HttpClients (those used to authenticate to IDS4 and call REST endpoints) to use Http/2. There are solutions on the web, but I didn't spend much time to be honest.

I disabled the related lines: https://github.com/abpframework/abp-samples/blob/master/GrpcDemo/test/GrpcDemo.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs#L28

@maliming can you look at that. Thanks.

@hikalkan hikalkan added this to the 2.9 milestone May 23, 2020
maliming added a commit that referenced this issue May 29, 2020
Related #4062, This allows us to configure named remote service http client.
@maliming maliming modified the milestones: 2.9, 3.0 Jun 1, 2020
@maliming
Copy link
Member

maliming commented Jun 1, 2020

Set the DefaultRequestVersion property of HttpClient to HttpVersion.Version20 to solve.

Wait for abp v 2.9 #4138

@maliming
Copy link
Member

The DefaultRequestVersion property doesn't apply to the HttpClient.SendAsync method. The Http.HttpRequestMessage parameter passed as the argument to the HttpClient.SendAsync method has its own Version property that controls the HTTP version used for the request.

dotnet/runtime#31190

Components using SendAsync need to be changed to be compatible with http2.
Including methods such as IdentityModel's RequestClientCredentialsTokenAsync.
However, DefaultRequestVersion does not support netstandard2.0. This problem also needs to be resolved.

@maliming
Copy link
Member

maliming commented Jul 2, 2020

Wait: #3907

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants