Currently response text/plain, not application/json
What Golang rules:
https://github.com/golang/go/blob/9e277f7d554455e16ba3762541c53e9bfc1d8188/src/net/http/server.go#L94-L101
What jsonhandlerfunc do:
|
w.WriteHeader(httpCode) |
|
writeJSONResponse(w, outs) |
|
func writeJSONResponse(w http.ResponseWriter, out interface{}) { |
|
w.Header().Set("Content-Type", "application/json") |
Currently response
text/plain, notapplication/jsonWhat Golang rules:
https://github.com/golang/go/blob/9e277f7d554455e16ba3762541c53e9bfc1d8188/src/net/http/server.go#L94-L101
What
jsonhandlerfuncdo:jsonhandlerfunc/handler.go
Lines 110 to 111 in cf20ea2
jsonhandlerfunc/handler.go
Lines 219 to 220 in cf20ea2