add encoding section
This commit is contained in:
parent
8934ef9162
commit
e9fc51e4da
12
README.md
12
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user