mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-19 08:40:42 +00:00
Merge pull request #607 from smarterclayton/return_correct_content_type
Write the json content type for API responses
This commit is contained in:
commit
9e9d9b8913
@ -345,6 +345,7 @@ func (server *APIServer) notFound(w http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
|
||||
func (server *APIServer) write(statusCode int, object interface{}, w http.ResponseWriter) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(statusCode)
|
||||
output, err := api.Encode(object)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user