Skip to content

Commit

Permalink
Fix request.body field in HTTP request
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Flanagan committed Feb 27, 2018
1 parent 9b117df commit 42d8b95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (s *Server) Handle(task Tasker, authorizers Authorizers, ec *EndpointConfig
// read request body
var body = ""
if r.Body != nil {
if b, err := ioutil.ReadAll(r.Body); err != nil {
if b, err := ioutil.ReadAll(r.Body); err == nil {
body = string(b)
}
}
Expand Down

0 comments on commit 42d8b95

Please sign in to comment.