MCPcopy Index your code
hub / github.com/CodisLabs/codis / responseBodyAsBytes

Function responseBodyAsBytes

pkg/utils/rpc/api.go:84–90  ·  view source on GitHub ↗
(rsp *http.Response)

Source from the content-addressed store, hash-verified

82}
83
84func responseBodyAsBytes(rsp *http.Response) ([]byte, error) {
85 b, err := ioutil.ReadAll(rsp.Body)
86 if err != nil {
87 return nil, errors.Trace(err)
88 }
89 return b, nil
90}
91
92func responseBodyAsError(rsp *http.Response) (error, error) {
93 b, err := responseBodyAsBytes(rsp)

Callers 2

responseBodyAsErrorFunction · 0.85
apiRequestJsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected