Skip to content

Commit

Permalink
Merge branch 'master' into feature/update_logging_output
Browse files Browse the repository at this point in the history
  • Loading branch information
hikyaru-suzuki committed Jul 12, 2023
2 parents 8810063 + af4d8a6 commit c6b49a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion assert/http_assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, va
// empty string if building a new request fails.
func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string {
w := httptest.NewRecorder()
req, err := http.NewRequest(method, url+"?"+values.Encode(), nil)
if len(values) > 0 {
url += "?" + values.Encode()
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
return ""
}
Expand Down

0 comments on commit c6b49a4

Please sign in to comment.