- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for NewRequestWithContext (0.15 sec)
-
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) -
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) -
cmd/batch-handlers.go
return nil } buf, err := json.Marshal(ri) if err != nil { return err } ctx, cancel := context.WithTimeout(ctx, 10*time.Second) defer cancel() req, err := http.NewRequestWithContext(ctx, http.MethodPost, endpoint, bytes.NewReader(buf)) if err != nil { return err } if token != "" { req.Header.Set("Authorization", token) } req.Header.Set("Content-Type", "application/json")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 18 15:32:09 UTC 2024 - 62.2K bytes - Viewed (0) -
cmd/admin-handlers-users_test.go
u, err := url.Parse(fmt.Sprintf("%s://%s/minio/admin/v3/add-user?%s", ep.Scheme, ep.Host, s3utils.QueryEncode(urlValue))) if err != nil { c.Fatalf("unexpected url parse err: %v", err) } req, err := http.NewRequestWithContext(ctx, http.MethodPut, u.String(), nil) if err != nil { c.Fatalf("unexpected new request err: %v", err) } reqBodyArg := madmin.UserInfo{ SecretKey: secretKey, PolicyName: "consoleAdmin",
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 47.3K bytes - Viewed (0) -
cmd/admin-handlers.go
} } func getKubernetesInfo(dctx context.Context) madmin.KubernetesInfo { ctx, cancel := context.WithCancel(dctx) defer cancel() ki := madmin.KubernetesInfo{} req, err := http.NewRequestWithContext(ctx, http.MethodGet, kubernetesVersionEndpoint, nil) if err != nil { ki.Error = err.Error() return ki } client := &http.Client{ Transport: globalRemoteTargetTransport,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 11:32:32 UTC 2024 - 99.7K bytes - Viewed (0) -
cmd/bucket-replication.go
reqURL := &url.URL{ Scheme: epURL.Scheme, Host: epURL.Host, Path: healthCheckPathPrefix + healthCheckReadinessPath, } req, err := http.NewRequestWithContext(ctx, http.MethodGet, reqURL.String(), nil) if err != nil { return err } client := &http.Client{ Transport: globalRemoteTargetTransport, Timeout: 10 * time.Second, }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 06:49:55 UTC 2024 - 116.1K bytes - Viewed (0)