Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for roundTrip (0.78 sec)

  1. src/net/http/transport.go

    	}
    
    	// Transport request context.
    	//
    	// If RoundTrip returns an error, it cancels this context before returning.
    	//
    	// If RoundTrip returns no error:
    	//   - For an HTTP/1 request, persistConn.readLoop cancels this context
    	//     after reading the request body.
    	//   - For an HTTP/2 request, RoundTrip cancels this context after the HTTP/2
    	//     RoundTripper returns.
    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/url/url_test.go

    			t.Errorf("QueryEscape(%q) = %q, want %q", tt.in, actual, tt.out)
    		}
    
    		// for bonus points, verify that escape:unescape is an identity.
    		roundtrip, err := QueryUnescape(actual)
    		if roundtrip != tt.in || err != nil {
    			t.Errorf("QueryUnescape(%q) = %q, %s; want %q, %s", actual, roundtrip, err, tt.in, "[no error]")
    		}
    	}
    }
    
    var pathEscapeTests = []EscapeTest{
    	{
    		"",
    		"",
    		nil,
    	},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:52:38 UTC 2024
    - 52.1K bytes
    - Viewed (0)
  3. src/net/http/client_test.go

    	}
    }
    
    type roundTripperWithoutCloseIdle struct{}
    
    func (roundTripperWithoutCloseIdle) RoundTrip(*Request) (*Response, error) { panic("unused") }
    
    type roundTripperWithCloseIdle func() // underlying func is CloseIdleConnections func
    
    func (roundTripperWithCloseIdle) RoundTrip(*Request) (*Response, error) { panic("unused") }
    func (f roundTripperWithCloseIdle) CloseIdleConnections()               { f() }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:30:50 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  4. src/net/http/httputil/reverseproxy_test.go

    		}
    		resp.Body.Close()
    	}
    }
    
    type failingRoundTripper struct{}
    
    func (failingRoundTripper) RoundTrip(*http.Request) (*http.Response, error) {
    	return nil, errors.New("some error")
    }
    
    type staticResponseRoundTripper struct{ res *http.Response }
    
    func (rt staticResponseRoundTripper) RoundTrip(*http.Request) (*http.Response, error) {
    	return rt.res, nil
    }
    
    func TestReverseProxyErrorHandler(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 54.6K bytes
    - Viewed (0)
  5. src/net/http/request.go

    // [Request.Body] is set to body and will be closed (possibly
    // asynchronously) by the Client methods Do, Post, and PostForm,
    // and [Transport.RoundTrip].
    //
    // NewRequestWithContext returns a Request suitable for use with
    // [Client.Do] or [Transport.RoundTrip]. To create a request for use with
    // testing a Server Handler, either use the [NewRequest] function in the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 49.4K bytes
    - Viewed (0)
Back to top