- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 21 for DefaultClient (0.4 sec)
-
cni/pkg/plugin/plugin_test.go
func setupCNIEventClientWithMockServer(serverErr bool) (string, func() bool) { cniAddServerCalled := false // replace the global CNI client with mock newCNIClient = func(address, path string) CNIEventClient { c := http.DefaultClient eventC := CNIEventClient{ client: c, url: address + path, } return eventC } testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 21 18:32:01 UTC 2024 - 17.5K bytes - Viewed (0) -
pkg/kubelet/lifecycle/handlers_test.go
defer s.Close() req, err := http.NewRequest("GET", s.URL, nil) if err != nil { t.Fatal(err) } req.URL.Scheme = "https" _, err = http.DefaultClient.Do(req) if !isHTTPResponseError(err) { t.Errorf("unexpected http response error: %v", err) } } func TestRunSleepHandler(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 24.4K bytes - Viewed (0) -
src/net/http/request_test.go
t.Error("expected error from NewRequest with invalid method") } req, err := NewRequest("GET", "http://foo.example/", nil) if err != nil { t.Fatal(err) } req.Method = "bad method" _, err = DefaultClient.Do(req) if err == nil || !strings.Contains(err.Error(), "invalid method") { t.Errorf("Transport error = %v; want invalid method", err) } req, err = NewRequest("", "http://foo.com/", nil) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 18:42:34 UTC 2024 - 44K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/watch_test.go
request, err := http.NewRequest("GET", dest.String(), nil) if err != nil { t.Fatalf("unexpected error: %v", err) } request.Header.Add("Accept", "application/json") response, err := http.DefaultClient.Do(request) if err != nil { t.Fatalf("unexpected error: %v", err) } if response.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(response.Body)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 30 17:27:39 UTC 2023 - 30K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/proxy/upgradeaware_test.go
req, err := http.NewRequest("POST", "http://"+proxy.Listener.Addr().String()+"/some/path", nil) require.NoError(t, err) req.Header.Set(httpstream.HeaderConnection, httpstream.HeaderUpgrade) resp, err := http.DefaultClient.Do(req) require.NoError(t, err) defer resp.Body.Close() // Expect error response. assert.True(t, responder.called) assert.Equal(t, fakeStatusCode, resp.StatusCode) msg, err := io.ReadAll(resp.Body)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 10 07:29:34 UTC 2023 - 39.4K bytes - Viewed (0) -
pkg/kubelet/server/server_test.go
return authorizer.DecisionNoOpinion, "", nil } req, err := http.NewRequest(tc.Method, fw.testHTTPServer.URL+tc.Path, nil) require.NoError(t, err) resp, err := http.DefaultClient.Do(req) require.NoError(t, err) defer resp.Body.Close() assert.Equal(t, http.StatusForbidden, resp.StatusCode) assert.True(t, calledAuthenticate, "Authenticate was not called")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 51.5K bytes - Viewed (0) -
src/net/http/client_test.go
} func TestClientErrorWithRequestURI(t *testing.T) { defer afterTest(t) req, _ := NewRequest("GET", "http://localhost:1234/", nil) req.RequestURI = "/this/field/is/illegal/and/should/error/" _, err := DefaultClient.Do(req) if err == nil { t.Fatalf("expected an error") } if !strings.Contains(err.Error(), "RequestURI") { t.Errorf("wanted error mentioning RequestURI; got error: %v", err) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:30:50 UTC 2024 - 63.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/oidc_test.go
Prefix: pointer.String("prefix:"), }, }, }, SupportedSigningAlgs: []string{"RS256"}, now: func() time.Time { return now }, Client: http.DefaultClient, // test automatically sets CAContentProvider }, pubKeys: []*jose.JSONWebKey{ loadRSAKey(t, "testdata/rsa_1.pem", jose.RS256), },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 97.7K bytes - Viewed (0) -
src/net/http/transport.go
"sync" "sync/atomic" "time" _ "unsafe" "golang.org/x/net/http/httpguts" "golang.org/x/net/http/httpproxy" ) // DefaultTransport is the default implementation of [Transport] and is // used by [DefaultClient]. It establishes network connections as needed // and caches them for reuse by subsequent calls. It uses HTTP proxies // as directed by the environment variables HTTP_PROXY, HTTPS_PROXY
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 91K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"Cookie.RawExpires", Field, 0}, {"Cookie.SameSite", Field, 11}, {"Cookie.Secure", Field, 0}, {"Cookie.Unparsed", Field, 0}, {"Cookie.Value", Field, 0}, {"CookieJar", Type, 0}, {"DefaultClient", Var, 0}, {"DefaultMaxHeaderBytes", Const, 0}, {"DefaultMaxIdleConnsPerHost", Const, 0}, {"DefaultServeMux", Var, 0}, {"DefaultTransport", Var, 0}, {"DetectContentType", Func, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)