Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 104 for BODY (0.31 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. internal/config/cache/cache.go

    	}
    
    	resp, err := c.clnt.Do(req)
    	if err != nil {
    		return nil, err
    	}
    	defer xhttp.DrainBody(resp.Body)
    
    	switch resp.StatusCode {
    	case http.StatusNotFound:
    		return nil, ErrKeyMissing
    	case http.StatusOK:
    		co := &ObjectInfo{}
    		return co, co.DecodeMsg(msgp.NewReader(resp.Body))
    	default:
    		return nil, ErrInvalidArgument
    	}
    }
    
    // Set sets the cache object info
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  8. internal/config/identity/openid/providercfg.go

    	}
    
    	client := &http.Client{
    		Transport: transport,
    	}
    
    	resp, err := client.Do(req)
    	if err != nil {
    		return nil, err
    	}
    
    	defer xhttp.DrainBody(resp.Body)
    	if resp.StatusCode != http.StatusOK {
    		// uncomment this for debugging when needed.
    		// reqBytes, _ := httputil.DumpRequest(req, false)
    		// fmt.Println(string(reqBytes))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  9. 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)
  10. docs/iam/access-management-plugin.md

    ## Request and Response
    
    MinIO will make a `POST` request with a JSON body to the given plugin URL. If the auth token parameter is set, it will be sent as an authorization header.
    
    The JSON body structure can be seen from this sample:
    
    <details><summary>Request Body Sample</summary>
    
    ```json
    {
      "input": {
        "account": "minio",
        "groups": null,
    Plain Text
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Dec 13 22:28:48 GMT 2022
    - 4.4K bytes
    - Viewed (0)
Back to top