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);
|
log(response.code(), response.headers(), body);
|
||||||
String contentType = response.header("Content-Type");
|
String contentType = response.header("Content-Type");
|
||||||
if (body != null) {
|
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);
|
Resource rf = getParser(format).parse(body);
|
||||||
if (rf instanceof Bundle)
|
if (rf instanceof Bundle)
|
||||||
feed = (Bundle) rf;
|
feed = (Bundle) rf;
|
||||||
|
|
|
@ -276,7 +276,7 @@ public class FhirRequestBuilder {
|
||||||
byte[] body = response.body().bytes();
|
byte[] body = response.body().bytes();
|
||||||
String contentType = response.header("Content-Type");
|
String contentType = response.header("Content-Type");
|
||||||
if (body != null) {
|
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);
|
Resource rf = getParser(format).parse(body);
|
||||||
if (rf instanceof Bundle)
|
if (rf instanceof Bundle)
|
||||||
feed = (Bundle) rf;
|
feed = (Bundle) rf;
|
||||||
|
|
|
@ -270,7 +270,7 @@ public class FhirRequestBuilder {
|
||||||
byte[] body = response.body().bytes();
|
byte[] body = response.body().bytes();
|
||||||
String contentType = response.header("Content-Type");
|
String contentType = response.header("Content-Type");
|
||||||
if (body != null) {
|
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);
|
Resource rf = getParser(format).parse(body);
|
||||||
if (rf instanceof Bundle)
|
if (rf instanceof Bundle)
|
||||||
feed = (Bundle) rf;
|
feed = (Bundle) rf;
|
||||||
|
|
Loading…
Reference in New Issue