Skip to content

Commit

Permalink
Fix for issue #379 (#380)
Browse files Browse the repository at this point in the history
* Fix for issue #379

* Fix for build error
  • Loading branch information
apptaro authored Jun 9, 2022
1 parent 715d978 commit a106516
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.github.scribejava.core.oauth.OAuth10aService;
import io.github.redouane59.twitter.TwitterClient;
import io.github.redouane59.twitter.signature.TwitterCredentials;
import java.nio.charset.StandardCharsets;
import java.time.format.DateTimeFormatter;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -73,7 +74,7 @@ public <T> Optional<T> makeRequest(Verb verb, String url, Map<String, String> he
}
}
if (body != null && verb.isPermitBody()) {
request.setPayload(body);
request.setPayload(body.getBytes(StandardCharsets.UTF_8));
if (!request.getHeaders().containsKey("Content-Type")) {
request.addHeader("Content-Type", "application/json");
}
Expand Down

0 comments on commit a106516

Please sign in to comment.