package main import ( "net/http" "net/http/httptest" "strings" ) func httpRequest(method, path, body string) *http.Request { req := httptest.NewRequest(method, path, strings.NewReader(body)) if body != "" { req.Header.Set("Content-Type", "application/json") } return req } func httpRecorder() *httptest.ResponseRecorder { return httptest.NewRecorder() }