org.htmlparser.http
Class HttpHeader
Utility methods to display HTTP headers.
static String | getRequestHeader(HttpURLConnection connection) - Gets the request header for the connection.
|
static String | getResponseHeader(HttpURLConnection conn) - Gets the response header for the connection.
|
getRequestHeader
public static String getRequestHeader(HttpURLConnection connection)
Gets the request header for the connection.
This header is generated from the contents of the connection
and may not be exactly the same as the request that will be sent.
connection
- The connection to convert into an HTTP request header.
- The string that would be sent by the HTTP request.
getResponseHeader
public static String getResponseHeader(HttpURLConnection conn)
Gets the response header for the connection.
Calling this method on an un-connected connection will
generate an error, as will an attempt to get information
from a connected but invalid connection.
This header is generated from the contents of the connection
and may not be exactly the same as the response that was received.
conn
- The connection to convert into an HTTP response header.
- The string that was sent as the HTTP response.
| © 2005 Derrick Oswald Mai 08, 2008 |
HTML Parser is an open source library released under LGPL. |  |