Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ClientTrace (0.09 sec)

  1. src/net/http/transport.go

    // exception is HTTP status code 101 (Switching Protocols), which is
    // considered a terminal status and returned by [Transport.RoundTrip]. To see the
    // ignored 1xx responses, use the httptrace trace package's
    // ClientTrace.Got1xxResponse.
    //
    // Transport only retries a request upon encountering a network error
    // if the connection has been already been used successfully and if the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 91K bytes
    - Viewed (0)
  2. src/net/http/httputil/reverseproxy_test.go

    		// seeing a 1xx response.
    		ctx, cancel := context.WithCancel(context.Background())
    		defer cancel()
    		ctx = httptrace.WithClientTrace(ctx, &httptrace.ClientTrace{
    			Got1xxResponse: func(code int, header textproto.MIMEHeader) error {
    				cancel()
    				return nil
    			},
    		})
    
    		req, _ := http.NewRequestWithContext(ctx, "GET", "http://go.dev/", nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 54.6K bytes
    - Viewed (0)
Back to top