The getHeaderField()
and getHeaderFieldKey() don't return
the HTTP response code
After you've connected, you can retrieve the numeric
response code--200 in the above example--with the getResponseCode() method and the message associated with it--OK
in the above example--with the getResponseMessage()
method.