grpc-dotnet icon indicating copy to clipboard operation
grpc-dotnet copied to clipboard

application/grpc-web+proto support .net?

Open ptraced opened this issue 1 year ago • 6 comments

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

ptraced avatar Oct 01 '24 19:10 ptraced

@JamesNK

ptraced avatar Oct 14 '24 00:10 ptraced

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

I don't understand what you're asking.

JamesNK avatar Oct 14 '24 00:10 JamesNK

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.

ptraced avatar Oct 14 '24 00:10 ptraced

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?

JamesNK avatar Oct 14 '24 00:10 JamesNK

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

ptraced avatar Oct 14 '24 00:10 ptraced

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.

JamesNK avatar Oct 14 '24 07:10 JamesNK