Open aliasav opened 8 years ago
Hi @aliasav. django-gcm
reads data from the request.body attribute.
Do you have the same error using curl
?
curl -X POST -H "Content-Type: application/json" -d '{"dev_id": "test", "reg_id":"test", "name":"Test"}' http://192.168.0.103:8000/gcm/v1/device/register/
It works perfectly with curl, the error shows up while making a POST request through angular.
While registering a device with required parameters through angular, I get a 400 from the server.
This is the error response from the server:
A valid POST request is being sent from the client side, it is possible that the data is available in request.data rather than request,POST, in this case, it is probably causing an error in de-serailisation.