- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 104 for StatusOK (0.13 sec)
-
internal/http/response-recorder.go
func NewResponseRecorder(w http.ResponseWriter) *ResponseRecorder { rf, _ := w.(io.ReaderFrom) return &ResponseRecorder{ ResponseWriter: w, ReaderFrom: rf, StatusCode: http.StatusOK, StartTime: time.Now().UTC(), } } // ErrNotImplemented when a functionality is not implemented var ErrNotImplemented = errors.New("not implemented")
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Dec 02 00:13:19 UTC 2023 - 4.9K bytes - Viewed (0) -
src/net/http/pprof/testdata/delta_mutex.go
req := httptest.NewRequest("GET", "/debug/pprof/mutex?seconds=1", nil) rec := httptest.NewRecorder() rec.Body = new(bytes.Buffer) h.ServeHTTP(rec, req) resp := rec.Result() if resp.StatusCode != http.StatusOK { log.Fatalf("Request failed: %s\n%s", resp.Status, rec.Body) } fmt.Print(rec.Body)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 07 19:52:28 UTC 2023 - 1.2K bytes - Viewed (0) -
src/net/http/responsewrite_test.go
"Connection: close\r\n" + "Foo: Bar Baz\r\n" + "\r\n", }, // Want a single Content-Length header. Fixing issue 8180 where // there were two. { Response{ StatusCode: StatusOK, ProtoMajor: 1, ProtoMinor: 1, Request: &Request{Method: "POST"}, Header: Header{}, ContentLength: 0, TransferEncoding: nil, Body: nil,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 07 01:07:32 UTC 2022 - 6.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/discovery/root_test.go
resp, err := http.Get(server.URL) if err != nil { return nil, err } if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected server response, expected %d, actual: %d", http.StatusOK, resp.StatusCode) } groupList := metav1.APIGroupList{} err = decodeResponse(t, resp, &groupList) return &groupList, err }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 08 22:33:50 UTC 2018 - 6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/routes/version.go
c.Add(versionWS) } // handleVersion writes the server's version information. func (v Version) handleVersion(req *restful.Request, resp *restful.Response) { responsewriters.WriteRawJSON(http.StatusOK, *v.Version, resp.ResponseWriter)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 09 18:11:41 UTC 2022 - 1.6K bytes - Viewed (0) -
tests/integration/telemetry/policy/traffic_registry_only_test.go
Aggregation: "sum", Labels: map[string]string{ "destination_service_name": "istio-egressgateway", "response_code": "200", }, }, StatusCode: http.StatusOK, RequestHeaders: map[string]string{ // We inject this header in the VirtualService "Handled-By-Egress-Gateway": "true", }, }, }, // TODO add HTTPS through gateway {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 18 18:03:23 UTC 2022 - 3.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/generic/rest/response_checker_test.go
resp *http.Response expectError bool expected error name string }{ { resp: &http.Response{ Body: ioutil.NopCloser(bytes.NewBufferString("Success")), StatusCode: http.StatusOK, }, expectError: false, name: "ok", }, { resp: &http.Response{ Body: ioutil.NopCloser(bytes.NewBufferString("Invalid request.")), StatusCode: http.StatusBadRequest, },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 31 19:04:33 UTC 2018 - 2.6K bytes - Viewed (0) -
pkg/probe/tcp/tcp_test.go
) func TestTcpHealthChecker(t *testing.T) { // Setup a test server that responds to probing correctly server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) })) defer server.Close() tHost, tPortStr, err := net.SplitHostPort(server.Listener.Addr().String()) if err != nil { t.Errorf("unexpected error: %v", err) } tPort, err := strconv.Atoi(tPortStr)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 25 18:23:33 UTC 2017 - 1.8K bytes - Viewed (0) -
pkg/ctrlz/topics/env.go
fw.RenderHTML(w, tmpl, getVars()) }) _ = context.JSONRouter().StrictSlash(true).NewRoute().Methods("GET").Path("/").HandlerFunc(func(w http.ResponseWriter, req *http.Request) { fw.RenderJSON(w, http.StatusOK, getVars()) })
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 14:06:41 UTC 2023 - 1.8K bytes - Viewed (0) -
pkg/ctrlz/topics/mem.go
}) _ = context.JSONRouter().StrictSlash(true).NewRoute().Methods("GET").Path("/").HandlerFunc(func(w http.ResponseWriter, req *http.Request) { ms := &runtime.MemStats{} runtime.ReadMemStats(ms) fw.RenderJSON(w, http.StatusOK, ms) }) _ = context.JSONRouter().StrictSlash(true).NewRoute().Methods("PUT").Path("/forcecollection").HandlerFunc(func(w http.ResponseWriter, req *http.Request) { runtime.GC() w.WriteHeader(http.StatusAccepted)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 14:06:41 UTC 2023 - 1.8K bytes - Viewed (0)