According to: 
http://web2py.com/books/default/chapter/29/10/services#Restful-Web-Services, 
for the given controller api() the following example should be working:

$ curl -d "name=Tim" http://127.0.0.1:8000/myapp/default/api/friend.json
{"errors": {}, "id": 1}


   1. The first line I think it should be: 
      - 
      
      '$ curl -d "name=Tim" 
http://127.0.0.1:8000/myapp/default/api/*person*.json'
      
      - as the *parse_as_rest *of the example applies only to the GET 
      requests.
      - The respond from '$ curl -d "name=Tim" 
      http://127.0.0.1:8000/myapp/default/api/friend.json' is '400 BAD REQUEST'
      2. The response from the insertion of a new record after issuing the 
   (1) is: 'errorsid' instead of ' {"errors": {}, "id": 1}'. The creation 
   of the new record is OK, but the 'return locals()' from the POST definition 
   seems to bring only the keys as a response. Is there something broken?
   
I use the web2py Version: 2.5.1-stable+timestamp.2013.06.06.15.39.19



-- 

--- 
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