Dapeng Lin 18.Nov.07 10:02 PM a Web browser Application development 6.1 Windows XP
I created a HTTPURLConnection objection using
URLConnection connection = new URL("myURL").openConnection()
After that, I tried to retrieve the header field using connection.getHeaderField("Set-Cookie");
it seemed that my request was never sent out to the sever.
but if I try to use connection.getHeaderField(0), my request was sent out and connection.getHeaderField("Set-Cookie") also worked.
Now, how do I use connection.getHeaderField("Set-Cookie") directly without connection.getHeaderField(0).


|