you're trying to send a (likely) unparseable string as arg instead of a var.

i.e. 
http://whatever/app/services/call/json/echo/possibly_bogus_characters_not_allowed_in_a_uri

first of all make sure that your services.py holds the 

def call():
    session.forget()
    return service()


function
and, if I were you, I'll change the behaviour to call the page with

http://whatever/app/services/call/json/echo?variablename=possiblyboguscharacters_but_urlencoded_hence_safe

On Friday, March 22, 2013 1:00:04 PM UTC+1, frasse wrote:
>
>
> Hi 
>
> I try to send a json string to a json service  but I am geting invalid 
> request all the time. The echo service is works with normal string.
>
> do you have any idea 
>
> Thanks
> /F
>
>
> @service.json
> def echo(data):
>     """ echo test """
>     
>     return data
>
>
> My client 
>
> things = "[hi,ho]"
> url = "https://www.xxx.xxx/testapp/services/call/json/echo/"; + urllib.
> quote(things)  #urllib.quote(things.encode('utf-8'))
> print url
>
> page = urllib.urlopen(url).read() 
> print page
>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to