- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 23 for DrainBody (0.23 sec)
-
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 May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 4.6K 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(struct { io.Reader io.Closer }{ Reader: b.rc, Closer: closeWrapper(func() error { return nil }), }) return closer.Close() } return nil }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed Jan 31 02:11:45 GMT 2024 - 5.8K 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),
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed Apr 24 04:08:47 GMT 2024 - 18.7K 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 lamdba webhook target statistics such as
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Nov 17 20:02:26 GMT 2023 - 6.7K bytes - Viewed (0) -
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
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sun Jan 28 18:04:17 GMT 2024 - 11.3K bytes - Viewed (0) -
internal/event/target/webhook.go
} req.Header.Set("Content-Type", "application/json") resp, err := target.httpClient.Do(req) if err != nil { return err } defer xhttp.DrainBody(resp.Body) if resp.StatusCode < 200 || resp.StatusCode > 299 { return fmt.Errorf("sending event failed with %v", resp.Status) } return nil }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Nov 20 22:40:07 GMT 2023 - 8.5K 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 {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 25 21:28:16 GMT 2024 - 71.1K bytes - Viewed (1) -
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
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Apr 15 08:25:46 GMT 2024 - 11.1K 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 {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sun Apr 28 17:53:50 GMT 2024 - 14.4K 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) switch resp.StatusCode { case http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent: // accepted HTTP status codes. return nil case http.StatusForbidden:
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Mar 25 16:44:20 GMT 2024 - 14.9K bytes - Viewed (0)