I have created a REST API using Django. I'm making a POST request with some parameters
user_id="5453ab249b0dbb3b76000009"
user_type="instrcutor"
In apiary blueprint , i'm sending these as a part of request body like:
+ Request (application/json)
+ Body
{
"user_id": "5453ab249b0dbb3b76000009",
"user_type": "instructor"
}
But in my Django view , request.POST is coming like:
{u'{\n "user_id": "5453ab249b0dbb3b76000009",\n "user_type": "instructor"\n}': [u'']}
instead of
{u'user_id': [u'5453ab249b0dbb3b76000009'], u'user_type': [u'instructor']}
How can i send the post data correctly ?
EDIT
Here is the solution:
+ Request (application/x-www-form-urlencoded)
user_id=5453ab249b0dbb3b76000009&user_type=instructor