Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for NewRequestWithContext (0.18 sec)

  1. internal/config/dns/operator_dns.go

    	ctx, cancel := context.WithTimeout(context.Background(), defaultOperatorContextTimeout)
    	defer cancel()
    	e, err := c.endpoint(bucket, false)
    	if err != nil {
    		return newError(bucket, err)
    	}
    	req, err := http.NewRequestWithContext(ctx, http.MethodPost, e, nil)
    	if err != nil {
    		return newError(bucket, err)
    	}
    	if err = c.addAuthHeader(req); err != nil {
    		return newError(bucket, err)
    	}
    
    	resp, err := c.httpClient.Do(req)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Mar 06 16:56:10 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  2. internal/config/identity/openid/providercfg.go

    	if p.JWKS.URL == nil || p.JWKS.URL.String() == "" {
    		return nil, errors.New("openid not configured")
    	}
    
    	req, err := http.NewRequestWithContext(ctx, http.MethodPost, p.DiscoveryDoc.UserInfoEndpoint, nil)
    	if err != nil {
    		return nil, err
    	}
    
    	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
    	if accessToken != "" {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. internal/config/identity/plugin/config.go

    	u := url.URL(*o.args.URL)
    	q := u.Query()
    	q.Set("token", token)
    	u.RawQuery = q.Encode()
    
    	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
    	defer cancel()
    	req, err := http.NewRequestWithContext(ctx, http.MethodPost, u.String(), nil)
    	if err != nil {
    		return AuthNResponse{}, err
    	}
    
    	if o.args.AuthToken != "" {
    		req.Header.Set("Authorization", o.args.AuthToken)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. internal/config/lambda/target/webhook.go

    func (target *WebhookTarget) isActive() (bool, error) {
    	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
    	defer cancel()
    
    	req, err := http.NewRequestWithContext(ctx, http.MethodHead, target.args.Endpoint.String(), nil)
    	if err != nil {
    		if xnet.IsNetworkOrHostDown(err, false) {
    			return false, errNotConnected
    		}
    		return false, err
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 08 21:39:49 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  5. api/go1.23.txt

    pkg net/http, type Cookie struct, Partitioned bool #62490
    pkg net/http, type Cookie struct, Quoted bool #46443
    pkg net/http, type Request struct, Pattern string #66405
    pkg net/http/httptest, func NewRequestWithContext(context.Context, string, string, io.Reader) *http.Request #59473
    pkg os, func CopyFS(string, fs.FS) error #62484
    pkg path/filepath, func Localize(string) (string, error) #57151
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Jun 25 17:08:08 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  6. cmd/utils.go

    	if err != nil {
    		return "", fmt.Errorf("url parse err: %v", err)
    	}
    
    	// Start the user auth flow. This page would present the login with
    	// email or LDAP option.
    	req, err := http.NewRequestWithContext(ctx, http.MethodGet, u.String(), nil)
    	if err != nil {
    		return "", fmt.Errorf("new request err: %v", err)
    	}
    	_, err = dexClient.Do(req)
    	// fmt.Printf("Do: %#v %#v\n", resp, err)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 13 22:22:04 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  7. cmd/prepare-storage.go

    	}
    
    	httpClient := &http.Client{
    		Transport: globalInternodeTransport,
    	}
    
    	ctx, cancel := context.WithTimeout(GlobalContext, timeout)
    	defer cancel()
    
    	req, err := http.NewRequestWithContext(ctx, http.MethodGet, serverURL.String(), nil)
    	if err != nil {
    		return err
    	}
    	// Indicate that the liveness check for a peer call
    	req.Header.Set(xhttp.MinIOPeerCall, "true")
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 11.1K bytes
    - Viewed (1)
  8. cmd/perf-tests.go

    		return
    	}
    	rp := cli.GetEndpointURL()
    	reqURL := &url.URL{
    		Scheme: rp.Scheme,
    		Host:   rp.Host,
    		Path:   reqPath,
    	}
    	result.Endpoint = rp.String()
    	req, err := http.NewRequestWithContext(ctx, http.MethodPost, reqURL.String(), reader)
    	if err != nil {
    		result.Error = err.Error()
    		return
    	}
    	client := &http.Client{
    		Transport: globalRemoteTargetTransport,
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  9. internal/logger/target/http/http.go

    			}
    			h.failedMessages.Add(int64(payloadCount))
    		} else {
    			h.status.Store(statusOnline)
    		}
    	}()
    
    	ctx, cancel := context.WithTimeout(ctx, timeout)
    	defer cancel()
    
    	req, err := http.NewRequestWithContext(ctx, http.MethodPost,
    		h.Endpoint(), bytes.NewReader(payload))
    	if err != nil {
    		return fmt.Errorf("invalid configuration for '%s'; %v", h.Endpoint(), err)
    	}
    	if payloadType != "" {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 11 22:20:42 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  10. cmd/batch-expire.go

    	if r.NotificationCfg.Endpoint == "" {
    		return nil
    	}
    
    	ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
    	defer cancel()
    
    	req, err := http.NewRequestWithContext(ctx, http.MethodPost, r.NotificationCfg.Endpoint, body)
    	if err != nil {
    		return err
    	}
    
    	if r.NotificationCfg.Token != "" {
    		req.Header.Set("Authorization", r.NotificationCfg.Token)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 18 17:59:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
Back to top