- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 22 for DrainBody (0.12 sec)
-
internal/event/target/webhook.go
} req.Header.Set("Content-Type", "application/json") resp, err := target.httpClient.Do(req) if err != nil { return err } xhttp.DrainBody(resp.Body) if resp.StatusCode >= 200 && resp.StatusCode <= 299 { // accepted HTTP status codes. return nil } else if resp.StatusCode == http.StatusForbidden {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.8K bytes - Viewed (0) -
cmd/bitrot-streaming.go
} func (b *streamingBitrotReader) Close() error { if b.rc == nil { return nil } if closer, ok := b.rc.(io.Closer); ok { // drain the body for connection reuse at network layer. xhttp.DrainBody(io.NopCloser(b.rc)) return closer.Close() } return nil } func (b *streamingBitrotReader) ReadAt(buf []byte, offset int64) (int, error) { var err error if offset%b.shardSize != 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 21 12:20:54 UTC 2024 - 6K bytes - Viewed (0) -
internal/config/lambda/target/webhook.go
} resp, err := target.httpClient.Do(req) if err != nil { if xnet.IsNetworkOrHostDown(err, true) { return false, errNotConnected } return false, err } xhttp.DrainBody(resp.Body) // No network failure i.e response from the target means its up return true, nil } // Stat - returns lambda webhook target statistics such as
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 08 21:39:49 UTC 2024 - 6.7K bytes - Viewed (0) -
cmd/update.go
Code: AdminUpdateUnexpectedFailure, Message: fmt.Sprintf("No response from server to download URL %s", u), StatusCode: http.StatusInternalServerError, } } defer xhttp.DrainBody(resp.Body) if resp.StatusCode != http.StatusOK { return content, AdminError{ Code: AdminUpdateUnexpectedFailure, Message: fmt.Sprintf("Error downloading URL %s. Response: %v", u, resp.Status),
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 18.7K bytes - Viewed (0) -
cmd/prepare-storage.go
return err } // Indicate that the liveness check for a peer call req.Header.Set(xhttp.MinIOPeerCall, "true") resp, err := httpClient.Do(req) if err != nil { return err } xhttp.DrainBody(resp.Body) return nil } // connect to list of endpoints and load all Erasure disk formats, validate the formats are correct
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 11.1K bytes - Viewed (1) -
cmd/perf-tests.go
return } client := &http.Client{ Transport: globalRemoteTargetTransport, } resp, err := client.Do(req) if err != nil { result.Error = err.Error() return } defer xhttp.DrainBody(resp.Body) err = gob.NewDecoder(resp.Body).Decode(&result) // endpoint have been overwritten result.Endpoint = rp.String() if err != nil { result.Error = err.Error() } return
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 11.8K bytes - Viewed (0) -
cmd/iam.go
NewHTTPTransport(), xhttp.DrainBody, globalSite.Region()) if err != nil { iamLogIf(ctx, fmt.Errorf("Unable to initialize AuthNPlugin: %w", err), logger.WarningKind) } setGlobalAuthNPlugin(idplugin.New(GlobalContext, authNPluginCfg)) authZPluginCfg, err := polplugin.LookupConfig(s, GetDefaultConnSettings(), xhttp.DrainBody) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 29 16:01:48 UTC 2024 - 74.6K bytes - Viewed (0) -
internal/logger/target/http/http.go
} resp, err := h.client.Do(req) if err != nil { return fmt.Errorf("%s returned '%w', please check your endpoint configuration", h.Endpoint(), err) } // Drain any response. xhttp.DrainBody(resp.Body) if resp.StatusCode >= 200 && resp.StatusCode <= 299 { // accepted HTTP status codes. return nil } else if resp.StatusCode == http.StatusForbidden {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 11 22:20:42 UTC 2024 - 15.6K bytes - Viewed (0) -
internal/rest/client.go
err = fmt.Errorf("Marking %s offline temporarily; caused by PreconditionFailed with drive ID mismatch", c.url.Host) logger.LogOnceIf(ctx, logSubsys, err, c.url.Host) c.MarkOffline(err) } defer xhttp.DrainBody(resp.Body) // Limit the ReadAll(), just in case, because of a bug, the server responds with large data. b, err := io.ReadAll(io.LimitReader(resp.Body, c.MaxErrResponseSize)) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 14.7K bytes - Viewed (0) -
cmd/batch-expire.go
req.Header.Set("Authorization", r.NotificationCfg.Token) } clnt := http.Client{Transport: getRemoteInstanceTransport()} resp, err := clnt.Do(req) if err != nil { return err } xhttp.DrainBody(resp.Body) if resp.StatusCode != http.StatusOK { return errors.New(resp.Status) } return nil } // Expire expires object versions which have already matched supplied filter conditions
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 18 17:59:03 UTC 2024 - 21.9K bytes - Viewed (0)