I am using angular-restmodto send POST requests to a Django REST Framework backend. But whenever a string containing ? will result in a broken POST data (when received): For instance, suppose I am sending POST data
{"properties": "values", "status": "?a=3", "other properties": "other values"}
the backend will receive request.data
MergeDict(<QueryDict: {u'{"properties": "values", "status": "?a': [u'3", "other properties": "other values"']}>, <MultiValueDict: {}>)
where things starts to fall apart at =.
PUT methods works fine in these kind of cases. I wonder how to fix this?
========== EDIT ==========
In the end I found an old setting for $http:
# $httpProvider.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded"
which overwrites the default JSON content type of restmod. I removed it, and the problem is solved.