The Response class in REST framework is similar to HTTPResponse, except that it is initialized with unrendered data, instead of a pre-rendered string.
The appropriate renderer is called during Django’s template response rendering.
Response(data=None, status=None, template_name=None, headers=None, exception=False, content_type=None)¶
An HttpResponse that allows its data to be rendered into arbitrary media types.
Returns reason text corresponding to our HTTP response status code. Provided for convenience.
Remove attributes from the response that shouldn’t be cached.