5
これはバグか、http応答パッケージがどのように動作するはずです。http応答ヘッダーが削除されています
この例ではContent-Type
レスポンスヘッダが、私はヘッダが、それは仕事をして設定されているかの順序反転どのようにこれまでであれば
// Return the response
w.WriteHeader(http.StatusCreated)
w.Header().Set("Content-Type", "application/json")
w.Write(js)
設定されません。
// Return the response
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusCreated)
w.Write(js)
実際今、この意志をヘッダーをapplication/json
に設定します。この動作は意図されていますか?