I am using Django REST framework
It returns Content-Type: application/json
in header.
Normally it works, but some browser needs the precise header such as
Content-Type: application/json; charset=utf-8
How can I do this ??
I just return the Response
here where should I set the header??
class SmartTagViewSet(viewsets.ModelViewSet):
queryset = Mood.objects.all()
serializer_class = SmartTagSerializer
def list(self,request,*args,**kwargs):
objs = SmartTag.objects.all()
custom_data = {
'items': SmartTagSerializer(objs, many=True).data
}
custom_data.update({
'meta':{"api":"SmartTag"}
})
return Response(custom_data)