Skip to content

Instantly share code, notes, and snippets.

@Allwin12
Created September 4, 2020 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Allwin12/f01de4dd019fde56131ef6219adc87aa to your computer and use it in GitHub Desktop.
Save Allwin12/f01de4dd019fde56131ef6219adc87aa to your computer and use it in GitHub Desktop.
class SampleView(APIView):
def get(self, request):
agent = request.META['HTTP_USER_AGENT']
print(agent)
return Response({'agent': agent})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment