Skip to content

Commit

Permalink
return body directly
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-goenka committed Jan 31, 2025
1 parent 685fd0b commit 8edb47a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions libs/testserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ func (s *Server) Handle(pattern string, handler HandlerFunc) {
body, err := io.ReadAll(r.Body)
assert.NoError(s.t, err)

var reqBody map[string]any
err = json.Unmarshal(body, &reqBody)
assert.NoError(s.t, err)

s.requests = append(s.requests, Request{
Method: r.Method,
Path: r.URL.Path,
Body: reqBody,
Body: json.RawMessage(body),
})

}
Expand Down

0 comments on commit 8edb47a

Please sign in to comment.