Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 114 for tbody (0.29 sec)

  1. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14K bytes
    - Viewed (0)
  2. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. cmd/storage-rest-server.go

    	fileSize, err := strconv.Atoi(fileSizeStr)
    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    
    	done, body := keepHTTPReqResponseAlive(w, r)
    	done(s.getStorage().CreateFile(r.Context(), origvolume, volume, filePath, int64(fileSize), body))
    }
    
    // DeleteVersionHandler delete updated metadata.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  10. internal/crypto/sse.go

    	if err != nil {
    		return
    	}
    	err = key.Unseal(clientKey, sealedKey, SSEC.String(), bucket, object)
    	return
    }
    
    // EncryptSinglePart encrypts an io.Reader which must be the
    // body of a single-part PUT request.
    func EncryptSinglePart(r io.Reader, key ObjectKey) io.Reader {
    	r, err := sio.EncryptReader(r, sio.Config{MinVersion: sio.Version20, Key: key[:], CipherSuites: fips.DARECiphers()})
    	if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Aug 30 15:26:43 GMT 2022
    - 4.4K bytes
    - Viewed (0)
Back to top