Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 650 for Req (0.02 sec)

  1. src/net/http/requestwrite_test.go

    				return
    			}
    			switch b := tt.Body.(type) {
    			case []byte:
    				tt.Req.Body = io.NopCloser(bytes.NewReader(b))
    			case func() io.ReadCloser:
    				tt.Req.Body = b()
    			}
    		}
    		setBody()
    		if tt.Req.Header == nil {
    			tt.Req.Header = make(Header)
    		}
    
    		var braw strings.Builder
    		err := tt.Req.Write(&braw)
    		if g, e := fmt.Sprintf("%v", err), fmt.Sprintf("%v", tt.WantError); g != e {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 01:07:32 UTC 2022
    - 23.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers.go

    	ctx := req.Context()
    	ctx, span := tracing.Start(ctx, "SerializeObject",
    		attribute.String("audit-id", audit.GetAuditIDTruncated(ctx)),
    		attribute.String("method", req.Method),
    		attribute.String("url", req.URL.Path),
    		attribute.String("protocol", req.Proto),
    		attribute.String("mediaType", mediaType),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 07 18:21:43 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go

    // connection.
    func (s *SpdyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
    	req = utilnet.CloneRequest(req)
    	req.Header.Add(httpstream.HeaderConnection, httpstream.HeaderUpgrade)
    	req.Header.Add(httpstream.HeaderUpgrade, HeaderSpdy31)
    
    	conn, err := s.Dial(req)
    	if err != nil {
    		return nil, err
    	}
    
    	responseReader := bufio.NewReader(conn)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:33:38 UTC 2023
    - 12.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/helpers.go

    	if lazy.req != nil {
    		accept := lazy.req.Header.Get("Accept")
    		return accept
    	}
    
    	return "unknown"
    }
    
    // lazyAPIGroup implements String() string and it will
    // lazily get Group from request info.
    type lazyAPIGroup struct {
    	req *http.Request
    }
    
    func (lazy *lazyAPIGroup) String() string {
    	if lazy.req != nil {
    		ctx := lazy.req.Context()
    		requestInfo, ok := apirequest.RequestInfoFrom(ctx)
    		if ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Sep 03 15:25:35 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  5. src/net/http/client_test.go

    	if tr.req.Method != "POST" {
    		t.Errorf("got method %q, want %q", tr.req.Method, "POST")
    	}
    	if tr.req.URL.String() != url {
    		t.Errorf("got URL %q, want %q", tr.req.URL.String(), url)
    	}
    	if tr.req.Header == nil {
    		t.Fatalf("expected non-nil request Header")
    	}
    	if tr.req.Close {
    		t.Error("got Close true, want false")
    	}
    	if g, e := tr.req.ContentLength, int64(len(json)); g != e {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:30:50 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  6. src/cmd/go/internal/web/http.go

    			fmt.Fprintf(os.Stderr, "# get %s\n", url.Redacted())
    		}
    
    		req, err := http.NewRequest("GET", url.String(), nil)
    		if err != nil {
    			return nil, err
    		}
    		if url.Scheme == "https" {
    			auth.AddCredentials(req)
    		}
    		t, intercepted := interceptURL(req.URL)
    		if intercepted {
    			req.Host = req.URL.Host
    			req.URL.Host = t.ToHost
    		}
    
    		release, err := base.AcquireNet()
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 10 17:34:27 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/endpoints/filters/webhook_duration.go

    	return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    		ctx := req.Context()
    		requestInfo, ok := request.RequestInfoFrom(ctx)
    		if !ok {
    			handleError(w, req, http.StatusInternalServerError, nil, "no RequestInfo found in context, handler chain must be wrong")
    			return
    		}
    
    		if watchVerbs.Has(requestInfo.Verb) {
    			handler.ServeHTTP(w, req)
    			return
    		}
    
    		req = req.WithContext(request.WithLatencyTrackers(ctx))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 05 21:12:12 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  8. src/cmd/go/internal/auth/auth.go

    package auth
    
    import "net/http"
    
    // AddCredentials fills in the user's credentials for req, if any.
    // The return value reports whether any matching credentials were found.
    func AddCredentials(req *http.Request) (added bool) {
    	host := req.Host
    	if host == "" {
    		host = req.URL.Hostname()
    	}
    
    	// TODO(golang.org/issue/26232): Support arbitrary user-provided credentials.
    	netrcOnce.Do(readNetrc)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 25 13:22:22 UTC 2022
    - 767 bytes
    - Viewed (0)
  9. src/net/http/triv.go

    	ctr.mu.Lock()
    	defer ctr.mu.Unlock()
    	return strconv.Itoa(ctr.n)
    }
    
    func (ctr *Counter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
    	ctr.mu.Lock()
    	defer ctr.mu.Unlock()
    	switch req.Method {
    	case "GET":
    		ctr.n++
    	case "POST":
    		var buf strings.Builder
    		io.Copy(&buf, req.Body)
    		body := buf.String()
    		if n, err := strconv.Atoi(body); err != nil {
    			fmt.Fprintf(w, "bad POST: %v\nbody: [%v]\n", err, body)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  10. pilot/pkg/xds/lds.go

    			return true
    		}
    		// Otherwise, only handle full pushes (skip endpoint-only updates)
    		if !req.Full {
    			return false
    		}
    	default:
    		if !req.Full {
    			// LDS only handles full push
    			return false
    		}
    	}
    	// If none set, we will always push
    	if len(req.ConfigsUpdated) == 0 {
    		return true
    	}
    	for config := range req.ConfigsUpdated {
    		if !skippedLdsConfigs[proxy.Type].Contains(config.Kind) {
    			return true
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 02 15:58:06 UTC 2024
    - 3.1K bytes
    - Viewed (0)
Back to top