- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 81 for body (0.13 sec)
-
cmd/bucket-lifecycle-handlers_test.go
} if testCase.shouldPass && !bytes.Equal(testCase.lifecycleResponse, rec.Body.Bytes()) { t.Errorf("Test %d: %s: Expected the response to be `%s`, but instead found `%s`", i+1, instanceType, string(testCase.lifecycleResponse), rec.Body.String()) } errorResponse := APIErrorResponse{} err = xml.Unmarshal(rec.Body.Bytes(), &errorResponse) if err != nil && !testCase.shouldPass {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Jun 13 20:52:33 GMT 2023 - 11.2K bytes - Viewed (0) -
internal/event/target/webhook.go
} req.Header.Set("Content-Type", "application/json") resp, err := target.httpClient.Do(req) if err != nil { return err } defer xhttp.DrainBody(resp.Body) if resp.StatusCode < 200 || resp.StatusCode > 299 { return fmt.Errorf("sending event failed with %v", resp.Status) } return nil }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Nov 20 22:40:07 GMT 2023 - 8.5K bytes - Viewed (0) -
cmd/object-handlers.go
End: -1, } opts.NoLock = true return getObjectNInfo(ctx, bucket, object, rs, r.Header, opts) }, actualSize, ) defer objectRSC.Close() s3Select, err := s3select.NewS3Select(r.Body) if err != nil { if serr, ok := err.(s3select.SelectError); ok { encodedErrorResponse := encodeResponse(APIErrorResponse{ Code: serr.ErrorCode(), Message: serr.ErrorMessage(),
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu May 02 20:15:54 GMT 2024 - 125.2K bytes - Viewed (0) -
cmd/test-utils_test.go
// Seek back to beginning. body.Seek(0, 0) // Add body req.Body = io.NopCloser(body) req.ContentLength = contentLength return req, nil } func assembleStreamingChunks(req *http.Request, body io.ReadSeeker, chunkSize int64, secretKey, signature string, currTime time.Time) (*http.Request, error, ) { regionStr := globalSite.Region var stream []byte var buffer []byte
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri May 03 17:26:51 GMT 2024 - 76.2K 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 May 05 19:28:20 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 May 05 19:28:20 GMT 2024 - Last Modified: Sun Apr 28 17:53:50 GMT 2024 - 14.4K bytes - Viewed (0) -
cmd/http-tracer.go
// Setup a http request response recorder - this is needed for // http stats requests and audit if enabled. respRecorder := xhttp.NewResponseRecorder(w) // Setup a http request body recorder reqRecorder := &xhttp.RequestRecorder{Reader: r.Body} r.Body = reqRecorder // Create tracing data structure and associate it to the request context tc := mcontext.TraceCtxt{ AmzReqID: w.Header().Get(xhttp.AmzRequestID),
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Nov 21 01:09:35 GMT 2023 - 5.9K bytes - Viewed (0) -
cmd/handler-utils_test.go
// Corrupted XML malformedReq := &http.Request{ Body: io.NopCloser(bytes.NewReader([]byte("<>"))), ContentLength: int64(len("<>")), } // Not an XML badRequest := &http.Request{ Body: io.NopCloser(bytes.NewReader([]byte("garbage"))), ContentLength: int64(len("garbage")), } // generates the input request with XML bucket configuration set to the request body.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 6.1K bytes - Viewed (0) -
internal/event/target/elasticsearch.go
res, err := c.Indices.ResolveIndex([]string{args.Index}) if err != nil { return err } defer res.Body.Close() var v map[string]interface{} found := false if err := json.NewDecoder(res.Body).Decode(&v); err != nil { return fmt.Errorf("Error parsing response body: %v", err) } indices, ok := v["indices"].([]interface{}) if ok { for _, index := range indices {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 15K 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 May 05 19:28:20 GMT 2024 - Last Modified: Thu Sep 14 21:50:16 GMT 2023 - 5.2K bytes - Viewed (1)