How to support emoji as param value?
Question
I am trying to send an android emoji UTF-8 encoded value as a param but is not working. For Oauth it is used Scribe The server is returning 401. The code snippet is:
OAuthRequest testRequest = new OAuthRequest(Verb.GET, BASE_URI + "/path/testParam?testParam=%F0%9F%90%B1");
getService().signRequest(token, testRequest);
Response response = testRequest.send();
System.out.println(response.getBody());
If I put other values for testParam it is going through. Or if I don't sign the request. Does someone know what the problem could be?
La solution
I solved this problem by double encoding the param value.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow