- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 104 for StatusOK (1.08 sec)
-
src/log/slog/example_test.go
return slog.Attr{} } return a }, }), ) logger.Info("finished", slog.Group("req", slog.String("method", r.Method), slog.String("url", r.URL.String())), slog.Int("status", http.StatusOK), slog.Duration("duration", time.Second)) // Output: // level=INFO msg=finished req.method=GET req.url=localhost status=200 duration=1s
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 14:56:30 UTC 2023 - 857 bytes - Viewed (0) -
pkg/ctrlz/topics/scopes.go
return scopeInfos[i].Name < scopeInfos[j].Name }) fw.RenderJSON(w, http.StatusOK, scopeInfos) } func getScope(w http.ResponseWriter, req *http.Request) { vars := mux.Vars(req) name := vars["scope"] if s := log.FindScope(name); s != nil { fw.RenderJSON(w, http.StatusOK, getScopeInfo(s)) return }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 14:06:41 UTC 2023 - 4K bytes - Viewed (0) -
cmd/crossdomain-xml-handler_test.go
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Jul 08 14:31:42 UTC 2023 - 1.3K bytes - Viewed (0) -
src/database/sql/example_service_test.go
defer cancel() err := s.db.PingContext(ctx) if err != nil { http.Error(w, fmt.Sprintf("db down: %v", err), http.StatusFailedDependency) return } w.WriteHeader(http.StatusOK) return case "/quick-action": // This is a short SELECT. Use the request context as the base of // the context timeout. ctx, cancel := context.WithTimeout(r.Context(), 3*time.Second) defer cancel()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 28 20:21:26 UTC 2024 - 4K bytes - Viewed (0) -
pkg/ctrlz/topics/version.go
fw.RenderHTML(w, tmpl, &version.Info) }) _ = context.JSONRouter().StrictSlash(true).NewRoute().Methods("GET").Path("/").HandlerFunc(func(w http.ResponseWriter, req *http.Request) { fw.RenderJSON(w, http.StatusOK, &version.Info) })
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 14:06:41 UTC 2023 - 1.5K bytes - Viewed (0) -
src/net/http/status.go
const ( StatusContinue = 100 // RFC 9110, 15.2.1 StatusSwitchingProtocols = 101 // RFC 9110, 15.2.2 StatusProcessing = 102 // RFC 2518, 10.1 StatusEarlyHints = 103 // RFC 8297 StatusOK = 200 // RFC 9110, 15.3.1 StatusCreated = 201 // RFC 9110, 15.3.2 StatusAccepted = 202 // RFC 9110, 15.3.3 StatusNonAuthoritativeInfo = 203 // RFC 9110, 15.3.4
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 10 23:30:35 UTC 2022 - 7.5K bytes - Viewed (0) -
src/cmd/go/internal/web/http.go
fileErr: err, }, nil } if err != nil { return nil, err } return &Response{ URL: u.Redacted(), Status: http.StatusText(http.StatusOK), StatusCode: http.StatusOK, Body: f, }, nil } func openBrowser(url string) bool { return browser.Open(url) } func isLocalHost(u *urlpkg.URL) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 10 17:34:27 UTC 2023 - 9.7K bytes - Viewed (0) -
pkg/http/get.go
} for k, v := range headers { req.Header.Set(k, v) } response, err := httpClient.Do(req) if err != nil { return nil, err } defer response.Body.Close() if response.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected status %d", response.StatusCode) } var b bytes.Buffer if _, err := io.Copy(&b, response.Body); err != nil { return nil, err } return &b, nil
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Aug 09 03:52:10 UTC 2023 - 1.9K bytes - Viewed (0) -
pkg/ctrlz/fw/utils.go
b := &bytes.Buffer{} if err := t.Execute(b, data); err != nil { RenderError(w, http.StatusInternalServerError, err) return } w.WriteHeader(http.StatusOK) w.Header().Set("Content-Type", "text/html; charset=utf-8") _, _ = b.WriteTo(w) } // RenderJSON outputs the given data as JSON func RenderJSON(w http.ResponseWriter, statusCode int, data any) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 14:06:41 UTC 2023 - 1.6K bytes - Viewed (0) -
istioctl/pkg/util/handlers/handlers_test.go
body := cmdtesting.ObjBody(codec, attachDeploy("istio-system")) return &http.Response{StatusCode: http.StatusOK, Header: cmdtesting.DefaultHeader(), Body: body}, nil case p == "/namespaces/test/deployments/foo" && m == "GET": body := cmdtesting.ObjBody(codec, attachDeploy("test")) return &http.Response{StatusCode: http.StatusOK, Header: cmdtesting.DefaultHeader(), Body: body}, nil default:
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jun 09 18:17:49 UTC 2023 - 6.6K bytes - Viewed (0)