mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 04:42:33 +02:00
14 lines
263 B
Go
14 lines
263 B
Go
package idlewatcher
|
|
|
|
import "net/http"
|
|
|
|
type (
|
|
roundTripper struct {
|
|
patched roundTripFunc
|
|
}
|
|
roundTripFunc func(*http.Request) (*http.Response, error)
|
|
)
|
|
|
|
func (rt roundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
|
|
return rt.patched(req)
|
|
}
|