I'm using the following function from the documentation for a RESTful web
service
def POST(table_name,**fields):
string = ""
if table_name == 'person':
for key in fields:
string = string + "another keyword arg: %s: %s" % (key,
fields[key])
return string
#return db.t_person.validate_and_insert(fields)
elif table_name == 'pet':
return db.pet.validate_and_insert(**vars)
else:
raise HTTP(400)
The JSON that's being posted isn't being included in **fields, Some
searching has lead me to information about the POST not being a key pair
but just JSON so I wondered if web2py was struggling with that?
http://stackoverflow.com/questions/6702490/how-to-use-extjs4-save-in-php-server/6703326#6703326
The data being sent also includes data on the URL eg
/api/person/?_dc=86876876
That is being returned in the response from the above function.
Any help appreciated.
Matt