سؤال

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?

هل كانت مفيدة؟

المحلول

I solved this problem by double encoding the param value.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top