Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #186 from svenmalvik/feature/charset
Browse files Browse the repository at this point in the history
[FIX] Added charset UTF-8 in requestBuilder
  • Loading branch information
t-8ch authored Jun 6, 2018
2 parents b919554 + 5bbaa12 commit 0fc7f94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/sonar/plugins/stash/client/StashClient.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.sonar.plugins.stash.client;

import java.nio.charset.StandardCharsets;
import java.util.Optional;
import org.asynchttpclient.AsyncHttpClient;
import org.asynchttpclient.BoundRequestBuilder;
Expand Down Expand Up @@ -351,6 +352,7 @@ private JsonObject performRequest(BoundRequestBuilder requestBuilder,
requestBuilder.setFollowRedirect(true);
requestBuilder.addHeader("Content-Type", JSON.toString());
requestBuilder.addHeader("Accept", JSON.toString());
requestBuilder.setCharset(StandardCharsets.UTF_8);

Request request = requestBuilder.build();
MDC.put(MDC_URL_KEY, request.getUrl());
Expand Down

0 comments on commit 0fc7f94

Please sign in to comment.