- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 53 for body (0.16 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 Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Sep 14 21:50:16 GMT 2023 - 5.8K 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 Apr 21 19:28:08 GMT 2024 - Last Modified: Wed Apr 12 21:37:19 GMT 2023 - 1.8K bytes - Viewed (0) -
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) -
internal/config/policy/opa/config.go
func (o *Opa) IsAllowed(args policy.Args) (bool, error) { if o == nil { return false, nil } // OPA 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.2K bytes - Viewed (1) -
cni/pkg/log/uds.go
if req.Body == nil { return } defer req.Body.Close() data, err := io.ReadAll(req.Body) if err != nil { log.Errorf("Failed to read log report from cni plugin: %v", err) return } l.processLog(data) } func (l *UDSLogger) processLog(body []byte) { cniLogs := make([]string, 0) err := json.Unmarshal(body, &cniLogs) if err != nil {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Nov 29 01:05:12 GMT 2023 - 3.3K bytes - Viewed (0) -
docs/iam/access-manager-plugin.go
} func mainHandler(w http.ResponseWriter, r *http.Request) { body, err := io.ReadAll(r.Body) if err != nil { writeErrorResponse(w, err) return } var out bytes.Buffer json.Indent(&out, body, "", " ") fmt.Printf("Received JSON payload:\n%s\n", out.String()) reqMap := make(map[string]interface{}) err = json.Unmarshal(body, &reqMap) if err != nil { writeErrorResponse(w, err) return }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Feb 08 17:15:20 GMT 2024 - 2.7K 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 Apr 21 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 Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Aug 19 01:35:22 GMT 2021 - 3.3K bytes - Viewed (0) -
internal/dsync/dsync-client_test.go
buf, err := args.MarshalMsg(nil) if err != nil { return false, err } body := bytes.NewReader(buf) respBody, err := restClient.rest.Call(context.Background(), method, url.Values{}, body, body.Size()) defer xhttp.DrainBody(respBody) switch toLockError(err) { case nil: return true, nil case errLockConflict, errLockNotFound:
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Jan 20 17:36:09 GMT 2022 - 4.4K bytes - Viewed (0) -
src/archive/zip/example_test.go
var files = []struct { Name, Body string }{ {"readme.txt", "This archive contains some text files."}, {"gopher.txt", "Gopher names:\nGeorge\nGeoffrey\nGonzo"}, {"todo.txt", "Get animal handling licence.\nWrite more examples."}, } for _, file := range files { f, err := w.Create(file.Name) if err != nil { log.Fatal(err) } _, err = f.Write([]byte(file.Body)) if err != nil { log.Fatal(err) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jan 27 00:22:03 GMT 2016 - 2K bytes - Viewed (0)