Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 182 for StatusOK (0.35 sec)

  1. samples/jwt-server/src/main.go

    			return
    		}
    
    		// If delay parameter is provided and valid, add delay
    		if delayDuration > 0 {
    			time.Sleep(delayDuration)
    		}
    	}
    
    	response.WriteHeader(http.StatusOK)
    	response.Write([]byte(string(jwtKey)))
    }
    
    func (s *JWTServer) startHTTP(address string, wg *sync.WaitGroup) {
    	defer func() {
    		wg.Done()
    		log.Printf("Stopped JWT HTTP server")
    	}()
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 16 23:56:50 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. istioctl/pkg/internaldebug/internal-debug_test.go

    		tf.UnstructuredClient = &fake.RESTClient{
    			NegotiatedSerializer: resource.UnstructuredPlusDefaultContentConfig().NegotiatedSerializer,
    			Resp: &http.Response{
    				StatusCode: http.StatusOK,
    				Header:     cmdtesting.DefaultHeader(),
    				Body: cmdtesting.ObjBody(codec,
    					cmdtesting.NewInternalType("", "", "foo")),
    			},
    		}
    		return tf
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Mar 15 08:28:50 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/phases/markcontrolplane/markcontrolplane_test.go

    					patchRequest = buf.String()
    				default:
    					t.Errorf("request for unexpected HTTP verb: %v", req.Method)
    					http.Error(w, "", http.StatusNotFound)
    					return
    				}
    
    				w.WriteHeader(http.StatusOK)
    				w.Write(jsonNode)
    			}))
    			defer s.Close()
    
    			cs, err := clientset.NewForConfig(&restclient.Config{Host: s.URL})
    			if err != nil {
    				t.Fatalf("unexpected error building clientset: %v", err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 25 14:22:20 UTC 2022
    - 5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/net/testing/http.go

    	if !ok {
    		h.t.Logf("Can't switch protocols using non-Hijacker ResponseWriter: type=%T, host=%s", rw, req.Host)
    		rw.WriteHeader(http.StatusInternalServerError)
    		return
    	}
    
    	rw.WriteHeader(http.StatusOK)
    
    	conn, brw, err := hj.Hijack()
    	if err != nil {
    		h.t.Logf("Failed to hijack client connection, host=%s: %v", req.Host, err)
    		return
    	}
    	defer conn.Close()
    
    	if err := brw.Flush(); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 20 14:58:46 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/endpoints/discovery/root.go

    		groups[i] = orderedGroups[i]
    		groups[i].ServerAddressByClientCIDRs = serverCIDR
    	}
    
    	responsewriters.WriteObjectNegotiated(s.serializer, negotiation.DefaultEndpointRestrictions, schema.GroupVersion{}, resp, req, http.StatusOK, &metav1.APIGroupList{Groups: groups}, false)
    }
    
    func (s *rootAPIsHandler) restfulHandle(req *restful.Request, resp *restful.Response) {
    	s.ServeHTTP(resp.ResponseWriter, req.Request)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 08 22:44:49 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers.go

    	status := ErrorToAPIStatus(err)
    	candidateStatusCode := int(status.Code)
    	// if the current status code is successful, allow the error's status code to overwrite it
    	if statusCode >= http.StatusOK && statusCode < http.StatusBadRequest {
    		w.statusCode = candidateStatusCode
    	}
    	output, err := runtime.Encode(encoder, status)
    	if err != nil {
    		w.mediaType = "text/plain"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 07 18:21:43 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/get.go

    		if err != nil {
    			scope.err(err, w, req)
    			return
    		}
    
    		span.AddEvent("About to write a response")
    		defer span.AddEvent("Writing http response done")
    		transformResponseObject(ctx, scope, req, w, http.StatusOK, outputMediaType, result)
    	}
    }
    
    // GetResource returns a function that handles retrieving a single resource from a rest.Storage object.
    func GetResource(r rest.Getter, scope *RequestScope) http.HandlerFunc {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Feb 16 10:22:16 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  8. pkg/test/framework/components/echo/check/checkers.go

    }
    
    // OK is shorthand for NoErrorAndStatus(200).
    func OK() echo.Checker {
    	return NoErrorAndStatus(http.StatusOK)
    }
    
    // NotOK is shorthand for ErrorOrNotStatus(http.StatusOK).
    func NotOK() echo.Checker {
    	return ErrorOrNotStatus(http.StatusOK)
    }
    
    // NoErrorAndStatus is checks that no error occurred and that the returned status code matches the expected
    // value.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Mar 03 16:19:07 UTC 2023
    - 17.5K bytes
    - Viewed (0)
  9. internal/config/identity/openid/providercfg.go

    	client := &http.Client{
    		Transport: transport,
    	}
    
    	resp, err := client.Do(req)
    	if err != nil {
    		return nil, err
    	}
    
    	defer xhttp.DrainBody(resp.Body)
    	if resp.StatusCode != http.StatusOK {
    		// uncomment this for debugging when needed.
    		// reqBytes, _ := httputil.DumpRequest(req, false)
    		// fmt.Println(string(reqBytes))
    		// respBytes, _ := httputil.DumpResponse(resp, true)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  10. internal/grid/trace.go

    	remote := strings.TrimPrefix(strings.TrimPrefix(t.Remote, httpsScheme), httpScheme)
    
    	start := time.Now()
    	body := bytesOrLength(req)
    	resp, err := c.roundtrip(h, req)
    	end := time.Now()
    	status := http.StatusOK
    	errString := ""
    	if err != nil {
    		errString = err.Error()
    		if IsRemoteErr(err) == nil {
    			status = http.StatusInternalServerError
    		} else {
    			status = http.StatusBadRequest
    		}
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Jun 01 05:17:37 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top