Skip to content

Commit

Permalink
Merge branch 'test' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
gj0dcsa committed Dec 8, 2023
2 parents 41f00fd + d1dd5ed commit d83e039
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.dcsa.conformance.core.scenario.ConformanceAction;
import org.dcsa.conformance.core.state.JsonNodeMap;
import org.dcsa.conformance.core.state.StatefulEntity;
import org.dcsa.conformance.core.toolkit.JsonToolkit;
import org.dcsa.conformance.core.traffic.ConformanceMessage;
import org.dcsa.conformance.core.traffic.ConformanceMessageBody;
import org.dcsa.conformance.core.traffic.ConformanceRequest;
Expand Down Expand Up @@ -229,12 +230,15 @@ private void _asyncCounterpartPatchPostOrPut(
counterpartConfiguration.getName(),
counterpartConfiguration.getRole(),
counterpartConfiguration.getAuthHeaderName().isBlank()
? Map.of("Api-Version", List.of(apiVersion))
: Map.of(
"Api-Version",
List.of(apiVersion),
counterpartConfiguration.getAuthHeaderName(),
List.of(counterpartConfiguration.getAuthHeaderValue())),
? Map.ofEntries(
Map.entry("Api-Version", List.of(apiVersion)),
Map.entry("Content-Type", List.of(JsonToolkit.JSON_UTF_8)))
: Map.ofEntries(
Map.entry("Api-Version", List.of(apiVersion)),
Map.entry("Content-Type", List.of(JsonToolkit.JSON_UTF_8)),
Map.entry(
counterpartConfiguration.getAuthHeaderName(),
List.of(counterpartConfiguration.getAuthHeaderValue()))),
new ConformanceMessageBody(jsonBody),
System.currentTimeMillis())),
responseCallback);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public enum JsonToolkit {
; // no instances

public static final String JSON_UTF_8 = "application/json;charset=utf-8";
public static final String JSON_UTF_8 = "application/json";

@SneakyThrows
public static JsonNode stringToJsonNode(String string) {
Expand Down

0 comments on commit d83e039

Please sign in to comment.