MCPcopy
hub / github.com/caddyserver/caddy / newRequestWithHeader

Function newRequestWithHeader

modules/caddyhttp/rewrite/rewrite_test.go:489–493  ·  view source on GitHub ↗
(t *testing.T, method, uri, headerKey, headerVal string)

Source from the content-addressed store, hash-verified

487}
488
489func newRequestWithHeader(t *testing.T, method, uri, headerKey, headerVal string) *http.Request {
490 req := newRequest(t, method, uri)
491 req.Header.Set(headerKey, headerVal)
492 return req
493}
494
495// reqEqual if r1 and r2 are equal enough for our purposes.
496func reqEqual(r1, r2 *http.Request) bool {

Callers 1

TestRewriteFunction · 0.85

Calls 2

newRequestFunction · 0.85
SetMethod · 0.45

Tested by

no test coverage detected