开发者

Java AddRequestProperty while already connected?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜