Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 114 for BODY (0.28 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. 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)
  3. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 13 20:52:33 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  4. misc/linkcheck/linkcheck.go

    	}
    	if res.StatusCode != 200 {
    		return errors.New(res.Status)
    	}
    	slurp, err := io.ReadAll(res.Body)
    	res.Body.Close()
    	if err != nil {
    		log.Fatalf("Error reading %s body: %v", url, err)
    	}
    	if *verbose {
    		log.Printf("Len of %s: %d", url, len(slurp))
    	}
    	body := string(slurp)
    	for _, ref := range localLinks(body) {
    		if *verbose {
    			log.Printf("  links to %s", ref)
    		}
    		dest := *root + ref
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Oct 06 15:53:04 GMT 2021
    - 3.9K bytes
    - Viewed (0)
  5. internal/config/subnet/subnet.go

    	}
    
    	var body bytes.Buffer
    	writer := multipart.NewWriter(&body)
    	part, e := writer.CreateFormFile("file", filename)
    	if e != nil {
    		return "", e
    	}
    
    	if _, e = part.Write(payload); e != nil {
    		return "", e
    	}
    	writer.Close()
    
    	r, e := http.NewRequest(http.MethodPost, reqURL, &body)
    	if e != nil {
    		return "", e
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 27 16:35:36 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  6. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:06:57 GMT 2024
    - 75.7K bytes
    - Viewed (0)
  7. 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)
  8. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  9. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  10. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 15K bytes
    - Viewed (0)
Back to top