From fc2cb2e44755a4ef84ea5bee78417c9539a90ea8 Mon Sep 17 00:00:00 2001 From: Mateus Date: Thu, 7 Dec 2023 16:10:15 -0300 Subject: [PATCH] =?UTF-8?q?Formatar=20conte=C3=BAdo=20das=20requisi=C3=A7?= =?UTF-8?q?=C3=B5es=20=C3=A0=20API=20como=20UTF-8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/br/com/totalvoice/TotalVoiceClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/br/com/totalvoice/TotalVoiceClient.java b/src/main/java/br/com/totalvoice/TotalVoiceClient.java index f5c001c..5666781 100644 --- a/src/main/java/br/com/totalvoice/TotalVoiceClient.java +++ b/src/main/java/br/com/totalvoice/TotalVoiceClient.java @@ -49,14 +49,14 @@ public JSONObject get(RequestInterface request) throws Exception { @Override public JSONObject post(RequestInterface request, JSONObject data) throws Exception { HttpPost post = new HttpPost(baseUrl + request.getURL()); - post.setEntity(new StringEntity(data.toString())); + post.setEntity(new StringEntity(data.toString(), "UTF-8")); return execute(post); } @Override public JSONObject put(RequestInterface request, JSONObject data) throws Exception { HttpPut put = new HttpPut(baseUrl + request.getURL()); - put.setEntity(new StringEntity(data.toString())); + put.setEntity(new StringEntity(data.toString(), "UTF-8")); return execute(put); }