Response Content-Type vs actual content type #837
Comments
This pattern of responses is kind of a careful balance between complying to the FHIR spec, and being tolerant of clients that aren't fully compliant (i.e. postel's law). The Are any of these causing issues for you? If this logic is causing problems I'm certainly happy to try and address them.. I suppose this one would probably be the best candidate for changing, since the client isn't explicitly requesting the legacy mimetype.
|
Thanks for the explanation, I can understand returning the old MIME type to clients that have requested it, some of whom may be intolerant of receiving anything else. I think the two that could be improved are 4 and 5. These currently return the old MIME type, even though the client has not requested it. I think there is a case for changing these to return a |
This is the behaviour that I observe with a GET on the ID of a STU3 resource, e.g. http://fhirtest.uhn.ca/baseDstu3/Medication/247168:
Content-Type: application/fhir+json
Accept: application/fhir+json
->Content-Type: application/fhir+json
Accept: application/json+fhir
->Content-Type: application/json+fhir
Accept: application/json
->Content-Type: application/json+fhir
Accept: application/fhir+json,application/json
->Content-Type: application/json+fhir
Accept: application/json,application/fhir+json
->Content-Type: application/fhir+json
Accept: application/fhir+json,application/json;q=0.9
->Content-Type: application/fhir+json
Considering that the resource I am requesting is a STU3 resource, why does it respond with
application/json+fhir
in any of these cases?I think it's probably OK to be tolerant of all the combinations, but why not call the response what it is:
application/fhir+json
?The text was updated successfully, but these errors were encountered: