23👍
✅
In postman set, the body as Raw and select JSON from the drop-down and send the request.
or
change the parser in Django rest framework
settings.py
REST_FRAMEWORK = {
'DEFAULT_PARSER_CLASSES': (
'rest_framework.parsers.FormParser',
'rest_framework.parsers.MultiPartParser'
)
}
3👍
You are probably sending your request with a MIME type that your method is not ready to work with.
Check out the media types in here:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
Can’t say much without looking at your request, but i hope it helps.
- Django's template tag inside javascript
- How to add report section to the Django admin?
- What is Django's TEMPLATE_DEBUG setting for?
- Django REST Framework: Validate before a delete
Source:stackexchange.com