You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Kai Liu <kl...@gmail.com> on 2014/10/30 14:21:37 UTC
Pass Chinese character using Restful
Dear all,
I am wondering if there is a way to pass Chinese characters:
1) using Get Request like this:
http://localhost:8080/rest/getPolicy?userName=user&policyName=CHINESECHARACTERS
2) using Post Request:
can I do something like this:
http://localhost:8080/rest/setPolicy?userName=user&policyName=CHINESECHARACTERS
then post a JSON file.
I tried the first one but failed. Do you have suggestions?
Thanks and best regards,
Kai Liu
Re: Pass Chinese character using Restful
Posted by Benson Margulies <be...@basistech.com>.
Yes, encode them in UTF-8 and then URL-encode that with the usual %xx
format.
On Thu, Oct 30, 2014 at 9:21 AM, Kai Liu <kl...@gmail.com> wrote:
> Dear all,
>
> I am wondering if there is a way to pass Chinese characters:
>
> 1) using Get Request like this:
>
>
> http://localhost:8080/rest/getPolicy?userName=user&policyName=CHINESECHARACTERS
>
> 2) using Post Request:
> can I do something like this:
>
>
> http://localhost:8080/rest/setPolicy?userName=user&policyName=CHINESECHARACTERS
>
> then post a JSON file.
>
> I tried the first one but failed. Do you have suggestions?
>
> Thanks and best regards,
>
> Kai Liu
>