(matcher Matcher, host string)
| 134 | } |
| 135 | |
| 136 | func WithHost(matcher Matcher, host string) Matcher { |
| 137 | return func(req *http.Request) bool { |
| 138 | if !strings.EqualFold(req.Host, host) { |
| 139 | return false |
| 140 | } |
| 141 | return matcher(req) |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | func WithHeader(responder Responder, header string, value string) Responder { |
| 146 | return func(req *http.Request) (*http.Response, error) { |
no outgoing calls