Hi,

I want to update table on PUT call from angular but, Angular PUT request is 
not recognised by Web2Py PUT restapi.


Here is angular code:

this.http.put('http://127.0.0.1:8000/automation/workflow/updateAgenda/'+this.id,
 
JSON.stringify(data)).subscribe(res=>{
console.log(res);
})


Here is Web2Py code:

@request.restful()
def updateAgenda():

    def PUT(id):
        data = json(request.body.read())
        ret = db(db.agenda.id == id]).update(**data)
        return ret



What I am doing wrong,

Please help me.





-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to