MCPcopy Create free account
hub / github.com/PuerkitoBio/fetchbot / Host

Method Host

handler.go:244–249  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
244func (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

Callers 2

TestMuxFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestMuxFunction · 0.64