from rest_framework.utils.mediatypes import _MediaType
from rest_framework.compat import unicode_http_header
media_type = _MediaType(request.accepted_media_type)
获取客户端的请求头的参数
from rest_framework.compat import unicode_http_header
media_type = _MediaType(request.accepted_media_type)
app = media_type.params.get('app', None)
或者
request.META
获取客户端的请求头的参数