Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 329 for StatusCode (0.15 sec)

  1. staging/src/k8s.io/cli-runtime/pkg/resource/helper_test.go

    			Err:     true,
    		},
    		{
    			name: "test2",
    			Resp: &http.Response{
    				StatusCode: http.StatusNotFound,
    				Header:     header(),
    				Body:       objBody(&metav1.Status{Status: metav1.StatusFailure}),
    			},
    			Err: true,
    		},
    		{
    			name: "test3pkg/kubectl/genericclioptions/resource/helper_test.go",
    			Resp: &http.Response{
    				StatusCode: http.StatusOK,
    				Header:     header(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 09:47:52 UTC 2023
    - 25.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go

    		var tokenReviewErr error
    		var statusCode int
    
    		start := time.Now()
    		result, statusCode, tokenReviewErr = w.tokenReview.Create(ctx, r, metav1.CreateOptions{})
    		latency := time.Since(start)
    
    		if statusCode != 0 {
    			w.metrics.RecordRequestTotal(ctx, strconv.Itoa(statusCode))
    			w.metrics.RecordRequestLatency(ctx, strconv.Itoa(statusCode), latency.Seconds())
    			return tokenReviewErr
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 18 00:47:42 UTC 2022
    - 11.5K bytes
    - Viewed (0)
  3. tests/test_starlette_exception.py

                headers={"X-Error": "Some custom header"},
            )
        return {"item": items[item_id]}
    
    
    @app.get("/http-no-body-statuscode-exception")
    async def no_body_status_code_exception():
        raise HTTPException(status_code=204)
    
    
    @app.get("/http-no-body-statuscode-with-detail-exception")
    async def no_body_status_code_with_detail_exception():
        raise HTTPException(status_code=204, detail="I should just disappear!")
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  4. pkg/ctrlz/fw/utils.go

    package fw
    
    import (
    	"bytes"
    	"encoding/json"
    	"fmt"
    	"html/template"
    	"net/http"
    )
    
    // RenderError outputs an error message
    func RenderError(w http.ResponseWriter, statusCode int, err error) {
    	w.WriteHeader(statusCode)
    	w.Header().Set("Content-Type", "text/plain; charset=utf-8")
    	_, _ = fmt.Fprintf(w, "%v", err)
    }
    
    // RenderHTML executes the given template, sending the output to the supplied response writer
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  5. internal/logger/audit.go

    			delete(entry.RespHeader, filterKey)
    		}
    
    		var (
    			statusCode      int
    			timeToResponse  time.Duration
    			timeToFirstByte time.Duration
    			outputBytes     int64 = -1 // -1: unknown output bytes
    			headerBytes     int64
    		)
    
    		tc, ok := r.Context().Value(mcontext.ContextTraceKey).(*mcontext.TraceCtxt)
    		if ok {
    			statusCode = tc.ResponseRecorder.StatusCode
    			outputBytes = int64(tc.ResponseRecorder.Size())
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  6. samples/jwt-server/src/main_test.go

    	if err != nil {
    		t.Fatalf(err.Error())
    	}
    	resp, err := httpClient.Do(httpReq)
    	if err != nil {
    		t.Fatalf(err.Error())
    	}
    	defer resp.Body.Close()
    	if resp.StatusCode != http.StatusOK {
    		t.Fatalf("Expected to get %d, got %d", http.StatusOK, resp.StatusCode)
    	}
    }
    
    func TestJwtHTTPSServer(t *testing.T) {
    	var (
    		serverKey  = "../testdata/server.key"
    		serverCert = "../testdata/server.crt"
    	)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 23 16:58:02 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/registry/generic/rest/response_checker_test.go

    	}{
    		{
    			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,
    			},
    			expectError: true,
    			expected:    errors.NewBadRequest("Invalid request."),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 31 19:04:33 UTC 2018
    - 2.6K bytes
    - Viewed (0)
  8. tests/integration/security/egress_gateway_origination_test.go

    			testCases := []struct {
    				name            string
    				statusCode      int
    				credentialToUse string
    				useGateway      bool
    			}{
    				// Use CA certificate stored as k8s secret with the same issuing CA as server's CA.
    				// This root certificate can validate the server cert presented by the echoboot server instance.
    				{
    					name:            "simple",
    					statusCode:      http.StatusOK,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  9. platforms/documentation/docs/src/snippets/publishing/javaLibrary/groovy/src/main/java/org/gradle/HttpClientWrapper.java

        private int doGet(GetMethod method) throws Exception {
            int statusCode = client.executeMethod(method);
            if (statusCode != HttpStatus.SC_OK) {
                System.err.println("Method failed: " + method.getStatusLine());
            }
            return statusCode;
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  10. platforms/documentation/docs/src/snippets/publishing/javaLibrary/kotlin/src/main/java/org/gradle/HttpClientWrapper.java

        private int doGet(GetMethod method) throws Exception {
            int statusCode = client.executeMethod(method);
            if (statusCode != HttpStatus.SC_OK) {
                System.err.println("Method failed: " + method.getStatusLine());
            }
            return statusCode;
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.4K bytes
    - Viewed (0)
Back to top