From e9fc51e4dab70274490efde0235abfa2213e8540 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Sun, 1 Jan 2017 19:20:53 +0000 Subject: [PATCH] add encoding section --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 966c6d9..ed6ed48 100644 --- a/README.md +++ b/README.md @@ -43,4 +43,16 @@ response := new(proto.Response) err := client.Call(context.TODO(), request, response) ``` +### Encoding + +Default protobuf with content-type application/proto +```go +client.NewRequest("service", "/path", protoRequest{}) +``` + +Json with content-type application/json +```go +client.NewJsonRequest("service", "/path", jsonRequest{}) +``` + Look at http_test.go for detailed use.