Host sets a criteria based on the host of the URL for the Response Handler. Its Handler will only be called if the host of the URL matches exactly the specified host.
(host string)
| 242 | // Host sets a criteria based on the host of the URL for the Response Handler. Its Handler |
| 243 | // will only be called if the host of the URL matches exactly the specified host. |
| 244 | func (r *ResponseMatcher) Host(host string) *ResponseMatcher { |
| 245 | r.mux.mu.Lock() |
| 246 | defer r.mux.mu.Unlock() |
| 247 | r.host = host |
| 248 | return r |
| 249 | } |
| 250 | |
| 251 | // Path sets a criteria based on the path of the URL for the Response Handler. Its Handler |
| 252 | // will only be called if the path of the URL starts with this path. Longer matches |