This commit is contained in:
jamesagnew 2018-08-12 19:03:24 -04:00
parent 1a5ba99e2d
commit 76c981664a
1 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,7 @@ public class PatchDstu3Test {
public void testPatchValidJson() throws Exception {
String requestContents = "[ { \"op\": \"add\", \"path\": \"/a/b/c\", \"value\": [ \"foo\", \"bar\" ] } ]";
HttpPatch httpPatch = new HttpPatch("http://localhost:" + ourPort + "/Patient/123");
httpPatch.addHeader(Constants.HEADER_PREFER, Constants.HEADER_PREFER_RETURN + "=" + Constants.HEADER_PREFER_RETURN_OPERATION_OUTCOME);
httpPatch.setEntity(new StringEntity(requestContents, ContentType.parse(Constants.CT_JSON_PATCH)));
CloseableHttpResponse status = ourClient.execute(httpPatch);
@ -70,6 +71,7 @@ public class PatchDstu3Test {
public void testPatchValidXml() throws Exception {
String requestContents = "<root/>";
HttpPatch httpPatch = new HttpPatch("http://localhost:" + ourPort + "/Patient/123");
httpPatch.addHeader(Constants.HEADER_PREFER, Constants.HEADER_PREFER_RETURN + "=" + Constants.HEADER_PREFER_RETURN_OPERATION_OUTCOME);
httpPatch.setEntity(new StringEntity(requestContents, ContentType.parse(Constants.CT_XML_PATCH)));
CloseableHttpResponse status = ourClient.execute(httpPatch);