Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 100 for body (0.18 sec)

  1. internal/http/response-recorder.go

    		lrw.headerBytesWritten += n
    	}
    }
    
    // blobBody returns a dummy body placeholder for blob (binary stream)
    var blobBody = []byte("<BLOB>")
    
    // gzippedBody returns a dummy body placeholder for gzipped content
    var gzippedBody = []byte("<GZIP>")
    
    // Body - Return response body.
    func (lrw *ResponseRecorder) Body() []byte {
    	if lrw.Header().Get("Content-Encoding") == "gzip" {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 02 00:13:19 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  2. internal/config/policy/plugin/config.go

    func (o *AuthZPlugin) IsAllowed(args policy.Args) (bool, error) {
    	if o == nil {
    		return false, nil
    	}
    
    	// Access Management Plugin Input
    	body := make(map[string]interface{})
    	body["input"] = args
    
    	inputBytes, err := json.Marshal(body)
    	if err != nil {
    		return false, err
    	}
    
    	req, err := http.NewRequest(http.MethodPost, o.args.URL.String(), bytes.NewReader(inputBytes))
    	if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Sep 14 21:50:16 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  3. cmd/admin-handlers-site-replication.go

    	if err := parseJSONBody(ctx, r.Body, &sites, cred.SecretKey); err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	opts := getSRAddOptions(r)
    	status, err := globalSiteReplicationSys.AddPeerClusters(ctx, sites, opts)
    	if err != nil {
    		adminLogIf(ctx, err)
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	body, err := json.Marshal(status)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 15 09:40:39 GMT 2024
    - 19.4K bytes
    - Viewed (0)
  4. internal/http/close.go

    )
    
    // DrainBody close non nil response with any response Body.
    // convenient wrapper to drain any remaining data on response body.
    //
    // Subsequently this allows golang http RoundTripper
    // to reuse the same connection for future requests.
    func DrainBody(respBody io.ReadCloser) {
    	// Callers should close resp.Body when done reading from it.
    	// If resp.Body is not closed, the Client's underlying RoundTripper
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  5. cmd/bucket-policy-handlers_test.go

    			t.Fatalf("Case %d: Expected the response status to be `%d`, but instead found `%d`", i+1, testCase.expectedRespStatus, recV4.Code)
    		}
    		// read the response body.
    		bucketPolicyReadBuf, err := io.ReadAll(recV4.Body)
    		if err != nil {
    			t.Fatalf("Test %d: %s: Failed parsing response body: <ERROR> %v", i+1, instanceType, err)
    		}
    
    		if recV4.Code != testCase.expectedRespStatus {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 32.7K bytes
    - Viewed (0)
  6. src/cmd/cgo/ast.go

    		f.walk(n.Body, ctxSwitch, visit)
    	case *ast.TypeSwitchStmt:
    		f.walk(n.Init, ctxStmt, visit)
    		f.walk(n.Assign, ctxStmt, visit)
    		f.walk(n.Body, ctxTypeSwitch, visit)
    	case *ast.CommClause:
    		f.walk(n.Comm, ctxStmt, visit)
    		f.walk(n.Body, ctxStmt, visit)
    	case *ast.SelectStmt:
    		f.walk(n.Body, ctxStmt, visit)
    	case *ast.ForStmt:
    		f.walk(n.Init, ctxStmt, visit)
    		f.walk(&n.Cond, ctxExpr, visit)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jun 07 16:54:27 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  7. 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)
    	}
    	return scopeInfos, nil
    }
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  8. cmd/admin-handlers_test.go

    		{mgmtBucket: "bucket", mgmtPrefix: "objprefix"},
    	}
    
    	// Body is always valid - we do not test JSON decoding.
    	body := `{"recursive": false, "dryRun": true, "remove": false, "scanMode": 0}`
    
    	// Test all combinations!
    	for pIdx, params := range qParamsArr {
    		for vIdx, vars := range varsArr {
    			_, err := extractHealInitParams(vars, params, bytes.NewReader([]byte(body)))
    			isErrCase := false
    			if pIdx < 4 || vIdx < 1 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  9. cmd/object-handlers_test.go

    			t.Fatalf("Case %d: Expected the response status to be `%d`, but instead found `%d`", i+1, testCase.expectedRespStatus, rec.Code)
    		}
    		// read the response body.
    		actualContent, err := io.ReadAll(rec.Body)
    		if err != nil {
    			t.Fatalf("Test %d: %s: Failed reading response body: <ERROR> %v", i+1, instanceType, err)
    		}
    
    		if rec.Code == http.StatusOK || rec.Code == http.StatusPartialContent {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 160K bytes
    - Viewed (0)
  10. cmd/utils.go

    // it is used to ignore custom encoding charset in S3 XML body.
    func nopCharsetConverter(label string, input io.Reader) (io.Reader, error) {
    	return input, nil
    }
    
    // xmlDecoder provide decoded value in xml.
    func xmlDecoder(body io.Reader, v interface{}, size int64) error {
    	var lbody io.Reader
    	if size > 0 {
    		lbody = io.LimitReader(body, size)
    	} else {
    		lbody = body
    	}
    	d := xml.NewDecoder(lbody)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 31.3K bytes
    - Viewed (0)
Back to top