rbeckman-nextgen / test-mc3

0 stars 0 forks source link

MIME-type application/fhir+json isn't recognized #4239

Open rbeckman-nextgen opened 4 years ago

rbeckman-nextgen commented 4 years ago

When searching for a resource and adding _format=application/fhir+json it is returning XML. If used _format=application/json it is returning JSON.

The specs from HLl7 FHIR have these MIME-TYPES: http://hl7.org/fhir/stu3/http.html#mime-type

Imported Issue. Original Details: Jira Issue Key: MIRTH-4383 Reporter: santosam Created: 2019-02-15T07:37:35.000-0800

rbeckman-nextgen commented 4 years ago

I think that the problem is on the Source Map, because when using application/fhir+json a print of

logger.debug("MIMEType:" + $('parameters').getParameter('_format'));

gives

MIMEType:application/fhir json

The "+" sign is striped from the string. From the Javadocs:

isMIMETypeJSON(java.lang.String mimeType) Returns true if the MIME type is "json", "application/fhir+json", or "application/json".

With json or application/json it works.

Imported Comment. Original Details: Author: santosam Created: 2019-02-19T08:54:03.000-0800