From ed5172731c075d601e4ca69eef95bebc03365d4d Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Sun, 28 Jun 2020 23:08:52 +0300 Subject: [PATCH] minor Former-commit-id: 983161656b264289fb664ca4237bf2a9fccbc5da --- HISTORY.md | 2 +- _examples/response-writer/protobuf/go.mod | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 _examples/response-writer/protobuf/go.mod 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