I'm not sure if this is a bug or how the http response package is supposed to work.
In this example the
Content-Type response header will not be set
// Return the response w.WriteHeader(http.StatusCreated) w.Header().Set("Content-Type", "application/json") w.Write(js)
How ever if I flip the order of how the headers are set it does work:
// Return the response w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusCreated) w.Write(js)
Now this will actual set the header to
application/json. Is this behavior intended?