openvidu-java-client: more UTF-8 HttpEntity fixes
This commit is contained in:
parent
b0d19484a7
commit
570056426c
@ -588,7 +588,7 @@ public class OpenVidu {
|
||||
|
||||
private JsonObject httpResponseToJson(HttpResponse response) throws OpenViduJavaClientException {
|
||||
try {
|
||||
JsonObject json = new Gson().fromJson(EntityUtils.toString(response.getEntity()), JsonObject.class);
|
||||
JsonObject json = new Gson().fromJson(EntityUtils.toString(response.getEntity(), "UTF-8"), JsonObject.class);
|
||||
return json;
|
||||
} catch (JsonSyntaxException | ParseException | IOException e) {
|
||||
throw new OpenViduJavaClientException(e.getMessage(), e.getCause());
|
||||
|
||||
@ -689,7 +689,7 @@ public class Session {
|
||||
private JsonObject httpResponseToJson(HttpResponse response) throws OpenViduJavaClientException {
|
||||
JsonObject json;
|
||||
try {
|
||||
json = new Gson().fromJson(EntityUtils.toString(response.getEntity()), JsonObject.class);
|
||||
json = new Gson().fromJson(EntityUtils.toString(response.getEntity(), "UTF-8"), JsonObject.class);
|
||||
} catch (JsonSyntaxException | IOException e) {
|
||||
throw new OpenViduJavaClientException(e.getMessage(), e.getCause());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user