MCPcopy
hub / github.com/gotify/server / RoundTrip

Method RoundTrip

runner/runner.go:105–115  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

103}
104
105func (l *LoggingRoundTripper) RoundTrip(r *http.Request) (resp *http.Response, err error) {
106 resp, err = l.RoundTripper.RoundTrip(r)
107 if resp.StatusCode == 429 {
108 log.Printf("%s Rate Limited: Retry-After %s on %s %s\n", l.Name, resp.Header.Get("Retry-After"), r.Method, r.URL.String())
109 } else if resp.StatusCode >= 400 {
110 log.Printf("%s Request Failed: Unexpected status code %d on %s %s\n", l.Name, resp.StatusCode, r.Method, r.URL.String())
111 } else if err != nil {
112 log.Printf("%s Request Failed: %s on %s %s\n", l.Name, err.Error(), r.Method, r.URL.String())
113 }
114 return resp, err
115}
116
117func applyLetsEncrypt(s *http.Server, conf *config.Configuration) {
118 httpClient := &http.Client{

Callers

nothing calls this directly

Calls 2

StringMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected