MCPcopy Create free account
hub / github.com/imroc/req / closeBody

Function closeBody

http_request.go:48–53  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

46}
47
48func closeBody(r *http.Request) error {
49 if r.Body == nil {
50 return nil
51 }
52 return r.Body.Close()
53}
54
55// requestBodyReadError wraps an error from (*Request).write to indicate
56// that the error came from a Read call on the Request.Body.

Callers 2

roundTripMethod · 0.85
rewindBodyFunction · 0.85

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…