Skip to content

added grpc-web as an content type and mapped it to grpc-proto #145

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nutterthanos
Copy link

No description provided.

@CLAassistant
Copy link

CLAassistant commented Feb 21, 2025

CLA assistant check
All committers have signed the CLA.

@nutterthanos
Copy link
Author

i haven't actually tested it if this format is the same as grpc-proto but i thought it was since it says grpc in the content-type

@pimterry
Copy link
Member

Good idea @nutterthanos! It would definitely be good to support this. It looks like the protocol is very closely related but not identical, although it's hard to tell at a glance whether the differences are important from our perspective. Do you have any good examples of sites using grpc-web I can use for testing?

@nutterthanos
Copy link
Author

Good idea @nutterthanos! It would definitely be good to support this. It looks like the protocol is very closely related but not identical, although it's hard to tell at a glance whether the differences are important from our perspective. Do you have any good examples of sites using grpc-web I can use for testing?

i don't have any atm unfortunately since not many api's or whatever seem to use that content-type

@nutterthanos
Copy link
Author

nutterthanos commented Mar 4, 2025

for example there is this one that used it:
https://ap-prod.api.mcd.com/gma/cxc/mcdonalds.sdui.screen.v1.ScreenService/GetScreen

for some weird reason there is application/grpc-web+proto as well but somehow that already can select gRPC as an content-type in the ui and that works

note that comes from the Mcdonalds app in Australia tho
also i think this would happen too This API only works with a near Australian IP but idk

there might be an similar one in the eu app too or whatever

@pimterry
Copy link
Member

I haven't managed to reproduce any of these to test this unfortunately. Can you share a HAR with some grpc-web traffic? Or a website example would be best - really grpc-web is intended to be used as a compatibility form of gRPC for web browsers, so there must be some websites actually using it somewhere surely...?

for some weird reason there is application/grpc-web+proto as well but somehow that already can select gRPC as an content-type in the ui and that works

Yep, that's expected, grpc does the same. The +proto is a general pattern used to describe one format built on top of another. Grpc defaults to being protobuf-based if you don't specify, but you can specify the underlying format if you like, and you can also do grpc over JSON instead (application/grpc+json) if you want.

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

Successfully merging this pull request may close these issues.

None yet

3 participants