Skip to content

Commit 7a1922c

Browse files
authored
Merge pull request #87 from simplelocalize/adjust-client-request
Add proper header
2 parents b449915 + 59c30b9 commit 7a1922c

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)