Answer the question
In order to leave comments, you need to log in
How to set POST request encoding on Android?
Actually the question is: There is a REST API, I send values to it and they are entered into the database, if through a test tool (well, sending POST, GET with parameters) then everything is ok with Russian letters, if I make a POST request with the same parameters via Android - then the encoding in the database is not clear, instead of Russian characters, question marks.
As I tested - chrome extension - Advanced REST client, through it you can send POST, GET, PUT, etc. with parameters. Through it, everything is perfectly entered with Russian characters. Through Android, everything is crooked, here is the code:
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpResponse httpResponse = null;
HttpPost httpPost = new HttpPost(url);
httpPost.setEntity(new UrlEncodedFormEntity(params));
httpResponse = httpClient.execute(httpPost);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question