Hi everyone,
I run into the following problem when implementing RESTful API.
I have this function in my controller:
@request.restful()
def prop():
response.view = 'generic.json'
session.forget(response)
def POST(**vars):
return dict()
return locals()
When I use cURL with valid JSON body like this one:
I get "invalid arguments" response.
When I send invalid JSON in request body, I get empty JSON ("{}") in response, which I assume is OK.
Can you please advice where could possibly be a problem?
I run web2py 2.9.11 on Apache and Python 2.6.1.
Thank you,
Tomas