MCPcopy
hub / github.com/fabiolb/fabio / mustDo

Function mustDo

proxy/http_integration_test.go:795–806  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

793}
794
795func mustDo(req *http.Request) (*http.Response, []byte) {
796 resp, err := http.DefaultClient.Do(req)
797 if err != nil {
798 panic(err)
799 }
800 defer resp.Body.Close()
801 body, err := io.ReadAll(resp.Body)
802 if err != nil {
803 panic(err)
804 }
805 return resp, body
806}
807
808func mustGet(urlstr string) (*http.Response, []byte) {
809 req, err := http.NewRequest("GET", urlstr, nil)

Callers 6

TestProxyRequestIDHeaderFunction · 0.85
testProxyLogOutputFunction · 0.85
TestProxyGzipHandlerFunction · 0.85
mustGetFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected