How do I get data from my Angular POST request in Google App Engine WebApp2? self.request.body
returns a string, and self.request.get(key)
returns nothing.
The Angular code that submits the POST is:
$http.post("/mail", {request_name: 'Test Name', request_body: 'Test Body'});
Then these two lines in my WebApp2 handler:
print "1: " + self.request.body
print "2: " + self.request.get('request_name')
Print this:
1: {"request_name":"Test Name","request_body":"Test Body"}
2:
What is the best way get data from the POST body? Or should I send the request differently?