mirror of https://github.com/OpenVidu/openvidu.git
openvidu-java-client: more UTF-8 HttpEntity fixes
parent
b0d19484a7
commit
570056426c
|
@ -588,7 +588,7 @@ public class OpenVidu {
|
||||||
|
|
||||||
private JsonObject httpResponseToJson(HttpResponse response) throws OpenViduJavaClientException {
|
private JsonObject httpResponseToJson(HttpResponse response) throws OpenViduJavaClientException {
|
||||||
try {
|
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;
|
return json;
|
||||||
} catch (JsonSyntaxException | ParseException | IOException e) {
|
} catch (JsonSyntaxException | ParseException | IOException e) {
|
||||||
throw new OpenViduJavaClientException(e.getMessage(), e.getCause());
|
throw new OpenViduJavaClientException(e.getMessage(), e.getCause());
|
||||||
|
|
|
@ -689,7 +689,7 @@ public class Session {
|
||||||
private JsonObject httpResponseToJson(HttpResponse response) throws OpenViduJavaClientException {
|
private JsonObject httpResponseToJson(HttpResponse response) throws OpenViduJavaClientException {
|
||||||
JsonObject json;
|
JsonObject json;
|
||||||
try {
|
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) {
|
} catch (JsonSyntaxException | IOException e) {
|
||||||
throw new OpenViduJavaClientException(e.getMessage(), e.getCause());
|
throw new OpenViduJavaClientException(e.getMessage(), e.getCause());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue