getRequestProperty(“Authorization”) always returns null

前端 未结 3 519
感动是毒
感动是毒 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:32

    I am not happy about the extra dependencies, but following the suggestion to switch to Commons Http solved the immediate problem for me.

    I'd still like to know what the problem was with my original code.

提交回复
热议问题