From faf5f019c1b0d0ef873a7e610c867a43a903f82d Mon Sep 17 00:00:00 2001 From: gj0dcsa <135594855+gj0dcsa@users.noreply.github.com> Date: Mon, 20 Nov 2023 20:24:56 +0100 Subject: [PATCH] Async counterpart PATCH and PUT --- .../conformance/core/party/ConformanceParty.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/dcsa/conformance/core/party/ConformanceParty.java b/core/src/main/java/org/dcsa/conformance/core/party/ConformanceParty.java index 12013cb5..b13343e2 100644 --- a/core/src/main/java/org/dcsa/conformance/core/party/ConformanceParty.java +++ b/core/src/main/java/org/dcsa/conformance/core/party/ConformanceParty.java @@ -165,10 +165,22 @@ protected void asyncCounterpartGet(String path) { System.currentTimeMillis()))); } + protected void asyncCounterpartPatch(String path, JsonNode jsonBody) { + _asyncCounterpartPatchPostOrPut("PATCH", path, jsonBody); + } + protected void asyncCounterpartPost(String path, JsonNode jsonBody) { + _asyncCounterpartPatchPostOrPut("POST", path, jsonBody); + } + + protected void asyncCounterpartPut(String path, JsonNode jsonBody) { + _asyncCounterpartPatchPostOrPut("PUT", path, jsonBody); + } + + private void _asyncCounterpartPatchPostOrPut(String method, String path, JsonNode jsonBody) { asyncWebClient.accept( new ConformanceRequest( - "POST", + method, counterpartConfiguration.getUrl() + path, Collections.emptyMap(), new ConformanceMessage(