Dear all, I'm trying to send json data from an IOS device to web2py server.
I can already receive Json-data from web2py server on my Iphone, but I'm 
not able to send it back again!
>From ios device I'm using Afnetworking framework, but even if i use 
something else the error i got is always the same:

> *{NSErrorFailingURLKey=http://127.0.0.1:8000/Json/default/ricevo, 
> NSLocalizedDescription=Expected status code in (200-299), got 500*


I think the problem is with my function "ricevo", what exactly i should put 
in my action to receive my Json data? 
I've tried many solutions, but with no result.
Can You point me in the right direction?
Thanks guys.
Marco
def ricevo():
  import gluon.contrib.simplejson as sj 
  data=sj.loads(request.body.read()) 
  return()

def ricevo():
    from json import loads, dumps
    data =  loads(request.vars.myvar)
    return dumps(data)

-- 



Reply via email to