Skip to content

Commit 59c30b9

Browse files
committed
Add proper header
1 parent 4b9d658 commit 59c30b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/io/simplelocalize/cli/client/SimpleLocalizeClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ public void purgeTranslations() throws IOException, InterruptedException
155155
public void sendException(Configuration configuration, Exception exception) throws IOException, InterruptedException
156156
{
157157
URI uri = uriFactory.buildStacktraceUri();
158-
HttpRequest httpRequest = httpRequestFactory.createBaseRequest(uri).POST(ClientBodyBuilders.ofException(configuration, exception)).build();
158+
HttpRequest httpRequest = httpRequestFactory.createBaseRequest(uri)
159+
.header("Content-Type", "application/json; charset=utf-8")
160+
.POST(ClientBodyBuilders.ofException(configuration, exception)).build();
159161
HttpResponse<String> httpResponse = httpClient.send(httpRequest, HttpResponse.BodyHandlers.ofString());
160162
throwOnError(httpResponse);
161163
}

0 commit comments

Comments
 (0)