Skip to content

Commit

Permalink
Fix message encoding issue. It was encoding using ISO-8859-1 by defau…
Browse files Browse the repository at this point in the history
…lt. Changed to UTF-8 encoding (#1134)

Co-authored-by: tjohnson7021 <[email protected]>
  • Loading branch information
basiliskus and tjohnson7021 authored Jun 6, 2024
1 parent 117a90c commit a9a1b54
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import gov.hhs.cdc.trustedintermediary.wrappers.HttpClient;
import gov.hhs.cdc.trustedintermediary.wrappers.HttpClientException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import org.apache.hc.client5.http.fluent.Request;
import org.apache.hc.core5.http.Header;
Expand Down Expand Up @@ -32,7 +33,7 @@ public String post(String url, Map<String, String> headerMap, String body)
try {
return Request.post(url)
.setHeaders(headers)
.body(new StringEntity(body))
.body(new StringEntity(body, StandardCharsets.UTF_8))
.execute()
.returnContent()
.asString();
Expand Down

0 comments on commit a9a1b54

Please sign in to comment.