Reputation: 5114
I'm trying to set the access token with all of my network calls in my Android app.
HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("Content-Type", "application/json"); conn.setRequestProperty("Authorization", "Token token=" + accessToken); conn.setRequestMethod("GET");
With this code, however, the header that our server is seeing is "HTTP_AUTHORIZATION" - not "AUTHORIZATION". After pouring over javadocs, I can't figure out how to not get it to append the "HTTP_".
Thanks!
Upvotes: 0
Views: 1130
Reputation: 7549
You can't. The mapping of Authorization to HTTP_AUTHORIZATION is part of the CGI Specification and happens on the server.
Upvotes: 2