Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 123 for StatusOK (0.15 sec)

  1. 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)
  2. 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)
  3. tests/integration/security/egress_gateway_origination_test.go

    				// This root certificate can validate the server cert presented by the echoboot server instance.
    				{
    					name:            "simple",
    					statusCode:      http.StatusOK,
    					credentialToUse: strings.TrimSuffix(credName, "-cacert"),
    					useGateway:      true,
    				},
    				// Use CA certificate stored as k8s secret with different issuing CA as server's CA.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  4. docs/auditlog/auditlog-echo.go

    		return
    	}
    
    	log.Printf(">>> %s %s\n", r.Method, r.URL.Path)
    	var out bytes.Buffer
    	json.Indent(&out, body, "", "    ")
    	log.Printf("%s\n", out.String())
    
    	w.WriteHeader(http.StatusOK)
    }
    
    func main() {
    	flag.Parse()
    	http.HandleFunc("/", mainHandler)
    
    	log.Printf("Listening on :%d\n", port)
    	log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 21:31:13 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/server/filters/priority-and-fairness_test.go

    		if err != nil {
    			t.Fatalf("Expected request: %q to get a response, but got error: %#v", secondRequestPathShouldWork, err)
    		}
    		if response.StatusCode != http.StatusOK {
    			t.Errorf("Expected HTTP status code: %d for request: %q, but got: %#v", http.StatusOK, secondRequestPathShouldWork, response)
    		}
    		select {
    		case <-secondHandlerDoneCh:
    		case <-time.After(wait.ForeverTestTimeout):
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  6. docs/iam/identity-manager-plugin.go

    		return
    	}
    
    	rsp, ok := tokens[token]
    	if !ok {
    		w.WriteHeader(http.StatusForbidden)
    		return
    	}
    
    	fmt.Printf("Allowed for token: %s user: %s\n", token, rsp.User)
    
    	w.WriteHeader(http.StatusOK)
    	json.NewEncoder(w).Encode(rsp)
    	return
    }
    
    func main() {
    	http.HandleFunc("/", mainHandler)
    
    	log.Print("Listening on :8081")
    	log.Fatal(http.ListenAndServe(":8081", nil))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 21:31:13 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/etag.go

    		w.WriteHeader(http.StatusNotModified)
    		return
    	}
    
    	responsewriters.WriteObjectNegotiated(
    		serializer,
    		DiscoveryEndpointRestrictions,
    		targetGV,
    		w,
    		req,
    		http.StatusOK,
    		object,
    		true,
    	)
    }
    
    func calculateETag(resources interface{}) (string, error) {
    	serialized, err := json.Marshal(resources)
    	if err != nil {
    		return "", err
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 18:15:22 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. pilot/cmd/pilot-agent/status/server.go

    	s.mutex.Lock()
    	if err != nil {
    		w.WriteHeader(http.StatusServiceUnavailable)
    
    		log.Warnf("Envoy proxy is NOT ready: %s", err.Error())
    		s.lastProbeSuccessful = false
    	} else {
    		w.WriteHeader(http.StatusOK)
    
    		if !s.lastProbeSuccessful {
    			log.Info("Envoy proxy is ready")
    		}
    		s.lastProbeSuccessful = true
    	}
    	s.mutex.Unlock()
    }
    
    func (s *Server) isReady() error {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  9. cni/pkg/plugin/cnieventclient.go

    	response, err = cniClient.client.Post(cniClient.url, "application/json", bytes.NewBuffer(eventData))
    	if err != nil {
    		return err
    	}
    	defer response.Body.Close()
    
    	if response.StatusCode != http.StatusOK {
    		return fmt.Errorf("unable to push CNI event, error was %d", response.StatusCode)
    	}
    
    	return nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 26 20:34:28 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  10. cmd/kubeadm/app/util/apiclient/wait.go

    						lastError = errors.WithMessagef(err, "%s /healthz check failed", comp.name)
    						return false, nil
    					}
    
    					defer func() {
    						_ = resp.Body.Close()
    					}()
    					if resp.StatusCode != http.StatusOK {
    						lastError = errors.Errorf("%s /healthz check failed with status: %d", comp.name, resp.StatusCode)
    						return false, nil
    					}
    
    					return true, nil
    				})
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 01 07:10:31 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top