(method, api string, body io.Reader)
| 94 | } |
| 95 | |
| 96 | func request(method, api string, body io.Reader) *httptest.ResponseRecorder { |
| 97 | req, _ := http.NewRequest(method, api, body) |
| 98 | req.SetBasicAuth(username, password) |
| 99 | w := httptest.NewRecorder() |
| 100 | server().ServeHTTP(w, req) |
| 101 | return w |
| 102 | } |