MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / WithHeaders

Function WithHeaders

lib/httputils/fetcher.go:60–64  ·  view source on GitHub ↗

WithHeaders sets the headers for the HTTP request.

(headers map[string]string)

Source from the content-addressed store, hash-verified

58
59// WithHeaders sets the headers for the HTTP request.
60func WithHeaders(headers map[string]string) FetchOption {
61 return func(o *FetchOptions) {
62 o.Request.Headers = headers
63 }
64}
65
66// WithExpectedStatusCodes sets the expected status codes for the HTTP response.
67func WithExpectedStatusCodes(codes []int) FetchOption {

Callers 1

TestHTTPFetcher_FetchFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestHTTPFetcher_FetchFunction · 0.68