Testing API’s JSON Response in Django
Problem: I needed to test the JSON response of an API endpoint. The API endpoint follows the JSON API spec and uses the Content-Type
header of application/vnd.api+json
instead of application/json
which is required by the built-in .json()
method.