storj / drpc

drpc is a lightweight, drop-in replacement for gRPC
MIT License
1.49k stars 49 forks source link

Incorrect JSON deser in HTTP example #28

Closed azell closed 1 year ago

azell commented 2 years ago

The DRPC server in examples/drpc_and_http/server/main.go is returning JSON on a successful call from the HTTP client.

Example: {"cookie":{"type":"Chocolate"}}

examples/drpc_and_http/http_client/main.go should change the JSON deser to: err = json.NewDecoder(resp.Body).Decode(&data.Response)

Not sure if the Status struct field is used at all on success.