Skip to content

Commit

Permalink
FHIR JSON resource matches spec MIME-type and encoding (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakewheeler authored Oct 11, 2024
1 parent 5afe931 commit 6a2298c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/app/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ func (app *Application) getFHIRCodeSystemByID(w http.ResponseWriter, r *http.Req
return
}

w.Header().Set("Content-Type", "application/json")

fhirCodeSystem, err := r5.SerializeCodeSystemToFhir(codeSystem, conceptCount, concepts)
if err != nil {
customErrors.ServerError(w, r, err, app.logger)
Expand All @@ -157,6 +155,7 @@ func (app *Application) getFHIRCodeSystemByID(w http.ResponseWriter, r *http.Req
return
}

w.Header().Set("Content-Type", "application/fhir+json; charset=UTF-8")
_, err = w.Write(fhirJson)
if err != nil {
customErrors.ServerError(w, r, err, app.logger)
Expand Down

0 comments on commit 6a2298c

Please sign in to comment.