How can i change charset encoding in HTTP response in Java
I have to fetch some JSON object from a remote server and for that i am using this function which is working great except that for sometime some weird data is getting fetched which i believe is because it is using ASCII charset to decode. Please find below thw method that i am using public HttpResponse call(String serviceURL,String serviceHost,String namespace,String methodName,String payloadKey, String payloadValue) throws ClientProtocolException,IOException,JSONException { HttpResponse response = null; HttpContext HTTP_CONTEXT = new BasicHttpContext(); HTTP_CONTEXT.setAttribute