- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for closeBody (0.16 sec)
-
src/net/http/client.go
if rt == nil { req.closeBody() return nil, alwaysFalse, errors.New("http: no Client.Transport or DefaultTransport") } if req.URL == nil { req.closeBody() return nil, alwaysFalse, errors.New("http: nil Request.URL") } if req.RequestURI != "" { req.closeBody()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 06:06:11 UTC 2024 - 33.7K bytes - Viewed (0) -
src/net/http/transport.go
if err != nil { return nil, err } } if !isHTTP { req.closeBody() return nil, badStringError("unsupported protocol scheme", scheme) } if req.Method != "" && !validMethod(req.Method) { req.closeBody() return nil, fmt.Errorf("net/http: invalid method %q", req.Method) } if req.URL.Host == "" { req.closeBody() return nil, errors.New("http: no Host in request URL") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 91K bytes - Viewed (0) -
src/net/http/response.go
return err } // Write body and trailer err = tw.writeBody(w) if err != nil { return err } // Success return nil } func (r *Response) closeBody() { if r.Body != nil { r.Body.Close() } } // bodyIsWritable reports whether the Body supports writing. The // Transport returns Writable bodies for 101 Switching Protocols // responses.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 11.1K bytes - Viewed (0) -
src/net/http/request.go
defer func() { trace.WroteRequest(httptrace.WroteRequestInfo{ Err: err, }) }() } closed := false defer func() { if closed { return } if closeErr := r.closeBody(); closeErr != nil && err == nil { err = closeErr } }() // Find the target host. Prefer the Host: header, but if that // is not given, use the host from the request URL. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 49.4K bytes - Viewed (0) -
src/net/http/transport_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 192.6K bytes - Viewed (0)