grpc / grpc-dotnet

gRPC for .NET
Apache License 2.0
4.22k stars 777 forks source link

application/grpc-web+proto support .net? #2551

Closed VendorAttestation closed 3 weeks ago

VendorAttestation commented 1 month ago

I can't find anything to send as application/grpc-web+proto trying to send using Grpc.Net.Client.Web

VendorAttestation commented 1 month ago

@JamesNK

JamesNK commented 1 month ago

application/grpc-web+proto is the same as application/grpc-web.

I don't understand what you're asking.

VendorAttestation commented 1 month ago

application/grpc-web+proto is the same as application/grpc-web.

I don't understand what you're asking.

Yes but the website im contacting for work needs the useragent to be application/grpc-web+proto specifically or we reject to request.

i tried a delegated handler with no success.

JamesNK commented 1 month ago

Could you provide some more details.

Is the client sending application/grpc-web+proto and the server fails? Or is the server sending application/grpc-web which causes the client to fail? What are the error details?

VendorAttestation commented 1 month ago

application/grpc-web

It sends with application/grpc-web i need the client to send application/grpc-web+proto but i can't even take over the User-Agent it just never sends the request tried via a delegated handler

JamesNK commented 1 month ago

You could add a delegating handler to work around this issue. The handler would get the content-type to the value you need. Just ensure it runs after GrpcWebHandler.

I think you're server is wrong in not accepting application/grpc-web. I don't think there should be a feature to change the header built into the existing handler.