Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Confused about content-type (application/json+fhir) #445
Currently the HAPI-FHIR JPA server returns results as content-type "application/json+fhir".
This is also stated here:
however this site states "application/fhir+json" which I feel is actually more correct as general JSON parsers like Springs AbstractJackson2HttpMessageConverter are configured to work for "application/*+json".
Although it's not yet a real spec by my knowledge, I do believe more custom JSON based content types like HAL also conform to this pattern.
I'd like to get some info on if any switch to "application/fhir+json" is planned or if "application/json+fhir" is the definitive type.
FHIR itself defines the content types we use as they have them spelled out as requirements in the specification.
One of the changes in the current STU3 ballot is that they've shifted from using
This change is reflected in HAPI's 2.0 release, but only in STU3 mode (i.e. DSTU3 contexts). You can see the updated content types in the request and response headers here for example: http://fhirtest.uhn.ca/conformance?serverId=home_21&pretty=true
E.g. the following is required to get the new content type from our public server: