Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 71 for StatusOK (0.41 sec)

  1. 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)
  2. istioctl/pkg/admin/istiodconfig.go

    	var scopeInfos []*ScopeInfo
    	resp, err := c.httpClient.Get(c.baseURL.String())
    	if err != nil {
    		return nil, err
    	}
    	defer resp.Body.Close()
    	if resp.StatusCode != http.StatusOK {
    		return nil, fmt.Errorf("request not successful %s", resp.Status)
    	}
    
    	err = json.NewDecoder(resp.Body).Decode(&scopeInfos)
    	if err != nil {
    		return nil, fmt.Errorf("cannot deserialize response %s", err)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Apr 13 05:23:38 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  3. internal/config/cache/cache.go

    	resp, err := c.clnt.Do(req)
    	if err != nil {
    		return nil, err
    	}
    	defer xhttp.DrainBody(resp.Body)
    
    	switch resp.StatusCode {
    	case http.StatusNotFound:
    		return nil, ErrKeyMissing
    	case http.StatusOK:
    		co := &ObjectInfo{}
    		return co, co.DecodeMsg(msgp.NewReader(resp.Body))
    	default:
    		return nil, ErrInvalidArgument
    	}
    }
    
    // Set sets the cache object info
    func (c Config) Set(ci *ObjectInfo) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. istioctl/pkg/proxyconfig/proxyconfig_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: Wed Apr 10 21:51:29 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. cmd/api-response.go

    func writeSuccessResponseJSON(w http.ResponseWriter, response []byte) {
    	writeResponse(w, http.StatusOK, response, mimeJSON)
    }
    
    // writeSuccessResponseXML writes success headers and response if any,
    // with content-type set to `application/xml`.
    func writeSuccessResponseXML(w http.ResponseWriter, response []byte) {
    	writeResponse(w, http.StatusOK, response, mimeXML)
    }
    
    // writeSuccessNoContent writes success headers with http status 204
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/util/version.go

    	if err != nil {
    		return "", errors.Errorf("unable to read content of URL %q: %s", url, err.Error())
    	}
    	bodyString := strings.TrimSpace(string(body))
    
    	if resp.StatusCode != http.StatusOK {
    		msg := fmt.Sprintf("unable to fetch file. URL: %q, status: %v", url, resp.Status)
    		return bodyString, errors.New(msg)
    	}
    	return bodyString, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 10:50:19 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  7. pilot/pkg/trustbundle/trustbundle_test.go

    	}
    	stop := test.NewStop(t)
    
    	// Mock response from TLS Spiffe Server
    	validHandler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    		w.WriteHeader(http.StatusOK)
    		_, _ = w.Write([]byte(validSpiffeX509Bundle))
    	})
    
    	server1 := httptest.NewTLSServer(validHandler)
    	caCertPool.AddCert(server1.Certificate())
    	defer server1.Close()
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  8. pkg/kubelet/server/server.go

    func writeJSONResponse(response *restful.Response, data []byte) {
    	if data == nil {
    		response.WriteHeader(http.StatusOK)
    		// do not write a nil representation
    		return
    	}
    	response.Header().Set(restful.HEADER_ContentType, restful.MIME_JSON)
    	response.WriteHeader(http.StatusOK)
    	if _, err := response.Write(data); err != nil {
    		klog.ErrorS(err, "Error writing response")
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 40.1K bytes
    - Viewed (0)
  9. src/cmd/vendor/github.com/google/pprof/internal/symbolizer/symbolizer.go

    	resp, err := client.Post(source, "application/octet-stream", strings.NewReader(post))
    	if err != nil {
    		return nil, fmt.Errorf("http post %s: %v", source, err)
    	}
    	defer resp.Body.Close()
    	if resp.StatusCode != http.StatusOK {
    		return nil, fmt.Errorf("http post %s: %v", source, statusCodeError(resp))
    	}
    	return io.ReadAll(resp.Body)
    }
    
    func statusCodeError(resp *http.Response) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 10K bytes
    - Viewed (0)
  10. security/pkg/k8s/chiron/utils_test.go

    		t.Logf("request: %+v", *req)
    		switch req.URL.Path {
    		default:
    			t.Logf("The request contains path: %v", req.URL)
    			resp.WriteHeader(http.StatusOK)
    		}
    	})
    
    	server.httpServer = httptest.NewTLSServer(handler)
    
    	t.Logf("Serving TLS at: %v", server.httpServer.URL)
    
    	return server
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 03:58:11 UTC 2024
    - 13K bytes
    - Viewed (0)
Back to top