Unsupported media type Django API Unsupported media type Django API django django

Unsupported media type Django API


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'     ) }


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.