diff --git a/HISTORY.md b/HISTORY.md index d0321457..b1e08d29 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -442,7 +442,7 @@ New Context Methods: - `Context.StopWithError(int, error)` stops the handlers chain, writes thre status code and the error's message - `Context.StopWithJSON(int, interface{})` stops the handlers chain, writes the status code and sends a JSON response - `Context.StopWithProblem(int, iris.Problem)` stops the handlers, writes the status code and sends an `application/problem+json` response -- `Context.Protobuf(proto.Message)` sends protobuf to the client +- `Context.Protobuf(proto.Message)` sends protobuf to the client (note that the `Context.JSON` is able to send protobuf as JSON) - `Context.MsgPack(interface{})` sends msgpack format data to the client - `Context.ReadProtobuf(ptr)` binds request body to a proto message - `Context.ReadJSONProtobuf(ptr, ...options)` binds JSON request body to a proto message diff --git a/_examples/response-writer/protobuf/go.mod b/_examples/response-writer/protobuf/go.mod new file mode 100644 index 00000000..8621348f --- /dev/null +++ b/_examples/response-writer/protobuf/go.mod @@ -0,0 +1,3 @@ +module app + +go 1.14