|
|
|
@ -76,17 +76,9 @@ func getHandler(headers []string) (http.Handler, *Server) {
|
|
|
|
|
|
|
|
|
|
router := pat.New()
|
|
|
|
|
|
|
|
|
|
router.Get("/json", func(resp http.ResponseWriter, req *http.Request) {
|
|
|
|
|
service.handleHTTP(resp, req, jsonResponse)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
router.Get("/text", func(resp http.ResponseWriter, req *http.Request) {
|
|
|
|
|
service.handleHTTP(resp, req, textResponse)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
router.Get("/html", func(resp http.ResponseWriter, req *http.Request) {
|
|
|
|
|
service.handleHTTP(resp, req, htmlResponse)
|
|
|
|
|
})
|
|
|
|
|
router.Get("/html", service.handleHTTPAs(htmlResponse))
|
|
|
|
|
router.Get("/json", service.handleHTTPAs(jsonResponse))
|
|
|
|
|
router.Get("/text", service.handleHTTPAs(textResponse))
|
|
|
|
|
|
|
|
|
|
router.Get("/", func(resp http.ResponseWriter, req *http.Request) {
|
|
|
|
|
if req.URL.Path == "/" {
|
|
|
|
|