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

feat(examples): add grpc-web example #710

Merged
merged 2 commits into from
Jul 9, 2021
Merged

Conversation

davidpdrsn
Copy link
Member

No description provided.

Creates a server using tonic-web and a client that uses a regular
`hyper::Client` and issues a regular HTTP/1.1 request.
@davidpdrsn davidpdrsn added the T-docs Improvements or additions to documentation label Jul 9, 2021
@davidpdrsn davidpdrsn requested a review from LucioFranco July 9, 2021 14:46
// one byte for the compression flag plus four bytes for the length
const GRPC_HEADER_SIZE: usize = 5;

fn encode_body<T>(msg: T) -> Bytes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this code for? Mocking grpc-web?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see we are working directly with h1 and hyper, nice.

@davidpdrsn davidpdrsn merged commit 5aa8ae1 into master Jul 9, 2021
@davidpdrsn davidpdrsn deleted the david/add-grpc-web-example branch July 9, 2021 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants