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

Docs - Add section about how HTTP maps to gRPC #227

Merged
merged 2 commits into from
Oct 4, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@ But patch is welcome.
* Encoding request/response body in XML
* True bi-directional streaming. (Probably impossible?)

# Mapping gRPC to HTTP

* [gRPC to HTTP header code mappings](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/runtime/errors.go#L15)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It isn't really a "header code" it is a http status code.

* HTTP request source IP is added as `X-Forwarded-For` gRPC metadata
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is added as a gRPC header

* HTTP request host is added as `X-Forwarded-Host` gRPC metadata
* HTTP `Authorization` header is added as `authorization` gRPC metadata
* Remaining HTTP header keys are prefixed with `Grpc-Metadata-` and added with their values to gRPC metadata

# Contribution
See [CONTRIBUTING.md](http://github.com/grpc-ecosystem/grpc-gateway/blob/master/CONTRIBUTING.md).

Expand Down