Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

set http response content type django

reponse = HttpResponse(content)
response['Content-Type'] = 'application/json' # or application/text, etc.

# one-line usage
reponse = HttpResponse(content, content_type:'application/json')
 
PREVIOUS NEXT
Tagged: #set #http #response #content #type #django
ADD COMMENT
Topic
Name
8+7 =