django - request.META - when sending request, what to do so that data appears in request.META
django, python
Solution
`With the exception of CONTENT_LENGTH and CONTENT_TYPE, as given above, any HTTP headers in the request are converted to META keys by converting all characters to uppercase, replacing any hyphens with underscores and adding an HTTP_ prefix to the name. So, for example, a header called X-Bender would be mapped to the META key HTTP_X_BENDER.`
See https://docs.djangoproject.com/en/dev/ref/request-response/
So, in your case, I think you need to simply send `{"TOKEN": "abc"}`.
Problem
In Django, many things lie in request.META, and my current code checks for something like HTTP_TOKEN in request.META, so when sending request I need to send request to that url so that in the receiving server, the data appears in request.META. I thought headers appear there, so I tried this: ``` python example:(I am sending request from javascript, but getting it work from any client is enough so I can implement finally using javascript). r = requests.get(url, headers={'HTTP_TOKEN': 'abc'}) ``` But after receiving request from that, I didnt find anything like HTTP_TOKEN in request.META.