java - Can solve URL DECODE Code? -
i developing android application.i using restfull webservice.i have encode url in get_search @ client side this
private httpresponse doresponse(string url) { httpclient httpclient = new defaulthttpclient(gethttpparams()); httpresponse response = null; seek { switch (tasktype) { case post_task: httppost httppost = new httppost(url); response = httpclient.execute(httppost); break; case get_search: string resturl1 = urlencoder.encode(url, "utf-8"); httpget httpget1 = new httpget(resturl1); response = httpclient.execute(httpget1); break; } } grab (exception e) { log.e("errrorrrrrrr", e.getlocalizedmessage(), e); } homecoming response; } now, need decode url in server side , server side code this.
@path("/search") @get @produces(mediatype.application_json) public customerentrydatalist getsearcheddetails( @queryparam("cusname") string cusname, @queryparam("compname") string compname, @queryparam("fromdate") string fromdate, @queryparam("enddate") string enddate, @queryparam("status") string status) throws sqlexception, parseexception { } here how can decode url @queryparam?
java android web-services rest restful-url
No comments:
Post a Comment