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

Function closeRequestBody

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

Source from the content-addressed store, hash-verified

82var errMissingHost = errors.New("http: Request.Write on Request with no Host or URL set")
83
84func closeRequestBody(r *http.Request) error {
85 if r.Body == nil {
86 return nil
87 }
88 return r.Body.Close()
89}
90
91// Headers that Request.Write handles itself and should be skipped.
92var reqWriteExcludeHeader = map[string]bool{

Callers 1

writeRequestMethod · 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…