var robotsTxtHandler …
func pedanticReadAll(r io.Reader) (b []byte, err error) { … }
func TestClient(t *testing.T) { … }
func testClient(t *testing.T, mode testMode) { … }
func TestClientHead(t *testing.T) { … }
func testClientHead(t *testing.T, mode testMode) { … }
type recordingTransport …
func (t *recordingTransport) RoundTrip(req *Request) (resp *Response, err error) { … }
func TestGetRequestFormat(t *testing.T) { … }
func TestPostRequestFormat(t *testing.T) { … }
func TestPostFormRequestFormat(t *testing.T) { … }
func TestClientRedirects(t *testing.T) { … }
func testClientRedirects(t *testing.T, mode testMode) { … }
func TestClientRedirectsContext(t *testing.T) { … }
func testClientRedirectsContext(t *testing.T, mode testMode) { … }
type redirectTest …
func TestPostRedirects(t *testing.T) { … }
func TestDeleteRedirects(t *testing.T) { … }
func testRedirectsByMethod(t *testing.T, mode testMode, method string, table []redirectTest, want string) { … }
func removeCommonLines(a, b string) (asuffix, bsuffix string, commonLines int) { … }
func TestClientRedirectUseResponse(t *testing.T) { … }
func testClientRedirectUseResponse(t *testing.T, mode testMode) { … }
func TestClientRedirectNoLocation(t *testing.T) { … }
func testClientRedirectNoLocation(t *testing.T, mode testMode) { … }
func TestClientRedirect308NoGetBody(t *testing.T) { … }
func testClientRedirect308NoGetBody(t *testing.T, mode testMode) { … }
var expectedCookies …
var echoCookiesRedirectHandler …
func TestClientSendsCookieFromJar(t *testing.T) { … }
type TestJar …
func (j *TestJar) SetCookies(u *url.URL, cookies []*Cookie) { … }
func (j *TestJar) Cookies(u *url.URL) []*Cookie { … }
func TestRedirectCookiesJar(t *testing.T) { … }
func testRedirectCookiesJar(t *testing.T, mode testMode) { … }
func matchReturnedCookies(t *testing.T, expected, given []*Cookie) { … }
func TestJarCalls(t *testing.T) { … }
func testJarCalls(t *testing.T, mode testMode) { … }
type RecordingJar …
func (j *RecordingJar) SetCookies(u *url.URL, cookies []*Cookie) { … }
func (j *RecordingJar) Cookies(u *url.URL) []*Cookie { … }
func (j *RecordingJar) logf(format string, args ...any) { … }
func TestStreamingGet(t *testing.T) { … }
func testStreamingGet(t *testing.T, mode testMode) { … }
type writeCountingConn …
func (c *writeCountingConn) Write(p []byte) (int, error) { … }
func TestClientWrites(t *testing.T) { … }
func testClientWrites(t *testing.T, mode testMode) { … }
func TestClientInsecureTransport(t *testing.T) { … }
func testClientInsecureTransport(t *testing.T, mode testMode) { … }
func TestClientErrorWithRequestURI(t *testing.T) { … }
func TestClientWithCorrectTLSServerName(t *testing.T) { … }
func testClientWithCorrectTLSServerName(t *testing.T, mode testMode) { … }
func TestClientWithIncorrectTLSServerName(t *testing.T) { … }
func testClientWithIncorrectTLSServerName(t *testing.T, mode testMode) { … }
func TestTransportUsesTLSConfigServerName(t *testing.T) { … }
func testTransportUsesTLSConfigServerName(t *testing.T, mode testMode) { … }
func TestResponseSetsTLSConnectionState(t *testing.T) { … }
func testResponseSetsTLSConnectionState(t *testing.T, mode testMode) { … }
func TestHTTPSClientDetectsHTTPServer(t *testing.T) { … }
func testHTTPSClientDetectsHTTPServer(t *testing.T, mode testMode) { … }
func TestClientHeadContentLength(t *testing.T) { … }
func testClientHeadContentLength(t *testing.T, mode testMode) { … }
func TestEmptyPasswordAuth(t *testing.T) { … }
func testEmptyPasswordAuth(t *testing.T, mode testMode) { … }
func TestBasicAuth(t *testing.T) { … }
func TestBasicAuthHeadersPreserved(t *testing.T) { … }
func TestStripPasswordFromError(t *testing.T) { … }
func TestClientTimeout(t *testing.T) { … }
func testClientTimeout(t *testing.T, mode testMode) { … }
func TestClientTimeout_Headers(t *testing.T) { … }
func testClientTimeout_Headers(t *testing.T, mode testMode) { … }
func TestClientTimeoutCancel(t *testing.T) { … }
func testClientTimeoutCancel(t *testing.T, mode testMode) { … }
func TestClientTimeoutDoesNotExpire(t *testing.T) { … }
func testClientTimeoutDoesNotExpire(t *testing.T, mode testMode) { … }
func TestClientRedirectEatsBody_h1(t *testing.T) { … }
func testClientRedirectEatsBody(t *testing.T, mode testMode) { … }
type eofReaderFunc …
func (f eofReaderFunc) Read(p []byte) (n int, err error) { … }
func TestReferer(t *testing.T) { … }
type issue15577Tripper …
func (issue15577Tripper) RoundTrip(*Request) (*Response, error) { … }
func TestClientRedirectResponseWithoutRequest(t *testing.T) { … }
func TestClientCopyHeadersOnRedirect(t *testing.T) { … }
func testClientCopyHeadersOnRedirect(t *testing.T, mode testMode) { … }
func TestClientCopyHostOnRedirect(t *testing.T) { … }
func testClientCopyHostOnRedirect(t *testing.T, mode testMode) { … }
func TestClientAltersCookiesOnRedirect(t *testing.T) { … }
func testClientAltersCookiesOnRedirect(t *testing.T, mode testMode) { … }
func TestShouldCopyHeaderOnRedirect(t *testing.T) { … }
func TestClientRedirectTypes(t *testing.T) { … }
func testClientRedirectTypes(t *testing.T, mode testMode) { … }
type issue18239Body …
func (b issue18239Body) Read([]byte) (int, error) { … }
func (b issue18239Body) Close() error { … }
func TestTransportBodyReadError(t *testing.T) { … }
func testTransportBodyReadError(t *testing.T, mode testMode) { … }
type roundTripperWithoutCloseIdle …
func (roundTripperWithoutCloseIdle) RoundTrip(*Request) (*Response, error) { … }
type roundTripperWithCloseIdle …
func (roundTripperWithCloseIdle) RoundTrip(*Request) (*Response, error) { … }
func (f roundTripperWithCloseIdle) CloseIdleConnections() { … }
func TestClientCloseIdleConnections(t *testing.T) { … }
type testRoundTripper …
func (t testRoundTripper) RoundTrip(req *Request) (*Response, error) { … }
func TestClientPropagatesTimeoutToContext(t *testing.T) { … }
func TestClientDoCanceledVsTimeout(t *testing.T) { … }
func testClientDoCanceledVsTimeout(t *testing.T, mode testMode) { … }
type nilBodyRoundTripper …
func (nilBodyRoundTripper) RoundTrip(req *Request) (*Response, error) { … }
func TestClientPopulatesNilResponseBody(t *testing.T) { … }
func TestClientCallsCloseOnlyOnce(t *testing.T) { … }
func testClientCallsCloseOnlyOnce(t *testing.T, mode testMode) { … }
type issue40382Body …
func (b *issue40382Body) Read(p []byte) (int, error) { … }
func (b *issue40382Body) Close() error { … }
func TestProbeZeroLengthBody(t *testing.T) { … }
func testProbeZeroLengthBody(t *testing.T, mode testMode) { … }