- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 114 for body (0.14 sec)
-
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 Mar 24 19:28:08 GMT 2024 - Last Modified: Thu Sep 14 21:50:16 GMT 2023 - 5.8K bytes - Viewed (0) -
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 Mar 24 19:28:08 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 32.7K bytes - Viewed (0) -
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 Mar 24 19:28:08 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 13.8K bytes - Viewed (0) -
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 Mar 27 22:53:09 GMT 2024 - Last Modified: Thu Feb 15 03:53:14 GMT 2024 - 13.6K bytes - Viewed (0) -
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 Mar 24 19:28:08 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 1.7K bytes - Viewed (0) -
docs/sts/client-grants.go
} hclient := http.Client{ Transport: t, } resp, err := hclient.Do(req) if err != nil { return nil, err } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("%s", resp.Status) } var idpToken JWTToken if err = json.NewDecoder(resp.Body).Decode(&idpToken); err != nil { return nil, err }
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Thu Aug 19 01:35:22 GMT 2021 - 3.3K bytes - Viewed (0) -
cmd/auth-handler_test.go
} } } // Provides a fully populated http request instance, fails otherwise. func mustNewRequest(method string, urlStr string, contentLength int64, body io.ReadSeeker, t *testing.T) *http.Request { req, err := newTestRequest(method, urlStr, contentLength, body) if err != nil { t.Fatalf("Unable to initialize new http request %s", err) } return req }
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 15.4K bytes - Viewed (0) -
internal/rest/client.go
func (c *Client) newRequest(ctx context.Context, u url.URL, body io.Reader) (*http.Request, error) { rc, ok := body.(io.ReadCloser) if !ok && body != nil { rc = io.NopCloser(body) } req := &http.Request{ Method: http.MethodPost, URL: &u, Proto: "HTTP/1.1", ProtoMajor: 1, ProtoMinor: 1, Header: make(http.Header), Body: rc, Host: u.Host, }
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Fri Mar 01 06:49:01 GMT 2024 - 13.9K bytes - Viewed (0) -
internal/http/request-recorder.go
} if err != nil { return n, err } return n, err } // Size returns the body size if the currently read object func (r *RequestRecorder) Size() int { return r.bytesRead } // Data returns the bytes that were recorded. func (r *RequestRecorder) Data() []byte { // If body logging is enabled then we return the actual body if r.LogBody { return r.buf.Bytes() } // ... otherwise we return <BLOB> placeholder
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Wed Apr 12 21:37:19 GMT 2023 - 1.8K bytes - Viewed (0) -
cmd/perf-tests.go
client := &http.Client{ Transport: globalRemoteTargetTransport, } resp, err := client.Do(req) if err != nil { result.Error = err.Error() return } defer xhttp.DrainBody(resp.Body) err = gob.NewDecoder(resp.Body).Decode(&result) // endpoint have been overwritten result.Endpoint = rp.String() if err != nil { result.Error = err.Error() } return
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Sun Jan 28 18:04:17 GMT 2024 - 11.3K bytes - Viewed (0)