This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
bactdb/handlers/json.go
Matthew Dillon e756b13099 Refactor handlers package
Fixes #19.
2015-10-13 11:06:02 -07:00

11 lines
259 B
Go

package handlers
import "net/http"
func jsonHandler(h http.Handler) http.Handler {
j := func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
h.ServeHTTP(w, r)
}
return http.HandlerFunc(j)
}