MCPcopy Create free account
hub / github.com/zalando/skipper / GetBody

Method GetBody

proxy/proxytest/proxytest.go:166–175  ·  view source on GitHub ↗

GetBody issues a GET to the specified URL, reads and closes response body and returns response, response body bytes and error if any.

(url string)

Source from the content-addressed store, hash-verified

164// GetBody issues a GET to the specified URL, reads and closes response body and
165// returns response, response body bytes and error if any.
166func (c *TestClient) GetBody(url string) (rsp *http.Response, body []byte, err error) {
167 rsp, err = c.Get(url)
168 if err != nil {
169 return
170 }
171 defer rsp.Body.Close()
172
173 body, err = io.ReadAll(rsp.Body)
174 return
175}

Callers 6

TestMetricsUncompressedFunction · 0.80
TestMeasureResponseSizeFunction · 0.80
TestMeasureProxyWatchFunction · 0.80
TestNewFunction · 0.80

Calls 2

GetMethod · 0.65
CloseMethod · 0.65

Tested by 6

TestMetricsUncompressedFunction · 0.64
TestMeasureResponseSizeFunction · 0.64
TestMeasureProxyWatchFunction · 0.64
TestNewFunction · 0.64