MCPcopy Create free account
hub / github.com/imroc/req / createTestServer

Function createTestServer

req_test.go:40–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40func createTestServer() *httptest.Server {
41 server := httptest.NewUnstartedServer(http.HandlerFunc(handleHTTP))
42 server.EnableHTTP2 = true
43 server.StartTLS()
44 return server
45}
46
47func handleHTTP(w http.ResponseWriter, r *http.Request) {
48 w.Header().Add("Method", r.Method)

Callers 1

getTestServerURLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…