Skip to content

Commit

Permalink
review: clarify the use of HttpBody fields
Browse files Browse the repository at this point in the history
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
  • Loading branch information
dio committed Jul 12, 2018
1 parent c2dc9e8 commit e9d9b1e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ Sending arbitrary content
-------------------------

By default, when transcoding occurs, gRPC-JSON encodes the message output of a gRPC service method into
JSON and sets the response `Content-Type` header to `application/json`. To send abritrary content, a gRPC
service method can use
JSON and sets the HTTP response `Content-Type` header to `application/json`. To send abritrary content,
a gRPC service method can use
`google.api.HttpBody <https://github.com/googleapis/googleapis/blob/master/google/api/httpbody.proto>`_
as its output message type. The implementation needs to set
`content_type <https://github.com/googleapis/googleapis/blob/master/google/api/httpbody.proto#L68>`_
and `data <https://github.com/googleapis/googleapis/blob/master/google/api/httpbody.proto#L71>`_ accordingly.
(which sets the value of the HTTP response `Content-Type` header) and
`data <https://github.com/googleapis/googleapis/blob/master/google/api/httpbody.proto#L71>`_
(which sets the HTTP response body) accordingly.

0 comments on commit e9d9b1e

Please sign in to comment.