Hi,

I'm trying to use the URL() function to connect to an external website's 
API, thus benefitting from web2py's HTML entity encoding feature.

I wrote something like this :

URL(scheme='http', domain='www.example.org', a='API', 
> vars={'locality':'some, city'})


and found that the encoded URL turns out like this : 

> http://www.example.org/APP_NAME/API?locality=some%2C+city


With APP_NAME being my current application in web2py...


I found a monkeypatch solution like this :

> URL(scheme='http', domain='www.example.org', a='API', c=' ', f=' ', 
> vars={'locality':'some, city'})
>
 
Which gives me an ugly but functional URL :

> http://www.example.org/API/ / ?locality=some%2C+city




*Is there a more elegant solution to this ?*

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to