getRequestProperty(“Authorization”) always returns null

前端 未结 3 515
感动是毒
感动是毒 2020-12-15 20:42

I am trying to read the authorization header for an HTTP request (because I need to add something to it), but I always get null for the header value. Other headers work fine

3条回答
  •  感情败类
    2020-12-15 21:30

    Have you tried using URLConnection.addRequestProperty()? This is how I use to add HTTP Request Headers.

提交回复
热议问题