{"id":"stdlib-http","name":"net/http","category":"http-routing","modulePath":"std","importPath":"net/http","summary":"HTTP handlers and routing in the Go standard library","capabilities":["routing"],"tradeoffs":["Advanced middleware conventions require application code."],"standardLibrary":true,"source":{"url":"https://pkg.go.dev/net/http","kind":"editorial summary of maintainer documentation","reviewedAt":"2026-09-30"},"metadata":{"version":"go1.27.1","goVersion":"1.22","licenses":["BSD-3-Clause"],"dependencies":[],"fetchedAt":"2026-09-30T18:11:37.637Z","sourceUrls":["https://go.dev/LICENSE","https://pkg.go.dev/net/http"],"vulnerabilities":{"status":"unknown","ids":[],"checkedAt":null,"source":null},"freshness":"current"},"example":{"id":"stdlib-http","code":"package main\n\nimport (\n    \"fmt\"\n    \"net/http\"\n    \"net/http/httptest\"\n)\n\nfunc main() {\n    mux := http.NewServeMux()\n    mux.HandleFunc(\"GET /hello\", func(w http.ResponseWriter, r *http.Request) {\n        fmt.Fprintln(w, \"hello\")\n    })\n    response := httptest.NewRecorder()\n    mux.ServeHTTP(response, httptest.NewRequest(http.MethodGet, \"/hello\", nil))\n    fmt.Print(response.Body.String())\n}\n","packageVersion":"go1.27.1","goVersion":"go1.27.1","verification":{"status":"passed","checkedAt":"2026-09-30T18:16:07.641Z","targets":["linux/amd64","windows/amd64"],"cgoEnabled":false},"notes":["Compile verification covers this example only. It does not test runtime behavior or every optional feature."],"goMod":"module example.com/discovery/stdlib-http\n\ngo 1.27.1\n","goSum":""}}