开发者

Java AddRequestProperty while already connected?

开发者 https://www.devze.com 2023-03-03 14:20 出处:网络
Is there a way to use addRequestProperty if you have already connected to the URLConnection? I 开发者_如何学JAVAneed to do this cause I first have to connect to get the headerfields for the first Cook

Is there a way to use addRequestProperty if you have already connected to the URLConnection? I 开发者_如何学JAVAneed to do this cause I first have to connect to get the headerfields for the first Cookie, but later I have to send that first Cookie in order to get headerfields where a second set-cookie field is defined.


That won't work. The HTTP protocol conveys those properties as header items at the beginning of the request data. You'll need multiple requests.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号