scala - Implement service with play framework in which one parameter is a url -


i creating web service play framework , scala. service url , language, , use information, can't put url service.

i have in routes /trans/$url<(http%3a%2f%2fa)>/:lang controllers.application.gettranslation(url:string, lang:string)

and in application: def gettranslation(iri: string,lang:string) = action { implicit request => etc.

and want receive '/trans/htp://a/es' (its http instead of htp can't write here)

is posible? because i've tried , i'm not able. ther ane way pass url parameter?

you have url escape , unescape on both sides. called url encoding or percent encoding (because escaped character rewritten using combination start %) https://en.wikipedia.org/wiki/percent-encoding

here question give information if client side in js: encode url in javascript?

and here nice scala library can used encode , decode url persent encoding. https://github.com/theon/scala-uri

i have started scala myself (most of prod work on playframework still in java), not know if there better scala uri library out there.

edit : got me curious searched bit: http://www.motobit.com/util/url-encoder.asp should carefull encoding on both sides.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -