mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-01 17:09:08 +00:00
Add support for JSON in tx client batch handling
This commit is contained in:
parent
718cd5e369
commit
34f149f0c8
@ -281,7 +281,7 @@ public class FhirRequestBuilder {
|
||||
log(response.code(), response.headers(), body);
|
||||
String contentType = response.header("Content-Type");
|
||||
if (body != null) {
|
||||
if (contentType.contains(ResourceFormat.RESOURCE_XML.getHeader()) || contentType.contains("text/xml+fhir")) {
|
||||
if (contentType.contains(ResourceFormat.RESOURCE_XML.getHeader()) || contentType.contains(ResourceFormat.RESOURCE_JSON.getHeader()) || contentType.contains("text/xml+fhir")) {
|
||||
Resource rf = getParser(format).parse(body);
|
||||
if (rf instanceof Bundle)
|
||||
feed = (Bundle) rf;
|
||||
|
@ -276,7 +276,7 @@ public class FhirRequestBuilder {
|
||||
byte[] body = response.body().bytes();
|
||||
String contentType = response.header("Content-Type");
|
||||
if (body != null) {
|
||||
if (contentType.contains(ResourceFormat.RESOURCE_XML.getHeader()) || contentType.contains("text/xml+fhir")) {
|
||||
if (contentType.contains(ResourceFormat.RESOURCE_XML.getHeader()) || contentType.contains(ResourceFormat.RESOURCE_JSON.getHeader()) || contentType.contains("text/xml+fhir")) {
|
||||
Resource rf = getParser(format).parse(body);
|
||||
if (rf instanceof Bundle)
|
||||
feed = (Bundle) rf;
|
||||
|
@ -270,7 +270,7 @@ public class FhirRequestBuilder {
|
||||
byte[] body = response.body().bytes();
|
||||
String contentType = response.header("Content-Type");
|
||||
if (body != null) {
|
||||
if (contentType.contains(ResourceFormat.RESOURCE_XML.getHeader()) || contentType.contains("text/xml+fhir")) {
|
||||
if (contentType.contains(ResourceFormat.RESOURCE_XML.getHeader()) || contentType.contains(ResourceFormat.RESOURCE_JSON.getHeader()) || contentType.contains("text/xml+fhir")) {
|
||||
Resource rf = getParser(format).parse(body);
|
||||
if (rf instanceof Bundle)
|
||||
feed = (Bundle) rf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user