| java.lang.Object edu.indiana.lib.twinpeaks.net.HttpTransaction
HttpTransaction | public class HttpTransaction (Code) | | Handle HTTP based search operations. Send (POST or GET) a query to the
server, read up the response.
The response text and HTTP details (status, character set, etc) are made
available to caller.
|
HttpTransaction | public HttpTransaction()(Code) | | Default constructor
|
clearParameters | public void clearParameters()(Code) | | Empty the parameter list
|
doTransaction | public int doTransaction(String url) throws IOException, DomException(Code) | | Perform one command transaction - add parameters and build the URL
Parameters: url - URL string to server-side resource HTTP response code |
doTransaction | public int doTransaction(URL url) throws IOException, DomException(Code) | | Perform one command transaction
Parameters: url - URL for server-side HTTP response code |
getBaseUrlSpecification | public String getBaseUrlSpecification() throws MalformedURLException(Code) | | Get the basic url specification for this connection
protocol://hostname[:port][/file] |
getDefaultCharacterSet | public String getDefaultCharacterSet()(Code) | | Get the default character set (use if none supplied by server)
The character set (iso-8859-1, utf-8, etc) |
getInputCharacterSet | public String getInputCharacterSet()(Code) | | Get the default character set (use if none supplied by server)
The character set (iso-8859-1, utf-8, etc) |
getParameter | public String getParameter(String name)(Code) | | Get a named parameter
Parameters: name - Parameter name Parameter value |
getParameterName | public String getParameterName(String value)(Code) | | Get parameter the name of first occurance of the supplied value
Parameters: value - Parameter value Parameter name |
getResponseBytes | public byte[] getResponseBytes()(Code) | | Get the unfiltered response as sent by the server (debug)
Response text as recieved |
getResponseCharacterSet | public String getResponseCharacterSet()(Code) | | Get the response document character set (supplied by the server)
The character set (as a String, default to iso-8859-1) |
getResponseCode | public int getResponseCode()(Code) | | Get the response status
The HTTP response code |
getResponseCookies | public List getResponseCookies()(Code) | | Get all provided cookies
CaseBlindHashMap of response-field/value pairs |
getResponseHeader | public String getResponseHeader(String key)(Code) | | Get a named HTTP response
Response value |
getResponseHeaders | public CaseBlindHashMap getResponseHeaders()(Code) | | Get all HTTP response headers
CaseBlindHashMap of response-field/value pairs |
getResponseString | public String getResponseString()(Code) | | Get the character-set-encoded String rendition of the server response
Response text as recieved |
getUrl | public String getUrl()(Code) | | Get the URL text sent to the server
URL string |
initialize | public void initialize(URL url, List cookieList)(Code) | | Initialize.
|
initialize | public void initialize(List cookieList)(Code) | | Initialize
|
setDefaultCharacterSet | public void setDefaultCharacterSet(String cs)(Code) | | Set the default character set
Parameters: cs - Character set (utf-8, etc)Note: the character set defaults to DEFAULTCS (above) if not overridden |
setFollowRedirects | public void setFollowRedirects(boolean follow)(Code) | | Honor redirects?
Parameters: follow - Set as true to follow any redirects suggested |
setInputCharacterSet | public void setInputCharacterSet(String cs)(Code) | | Set the input character set
Parameters: cs - Character set (utf-8, etc)Note: the character set defaults to DEFAULTCS (above) if not overridden |
setParameter | public void setParameter(String name, String value)(Code) | | Set up a name=value pair
Parameters: name - Parameter name Parameters: value - Parameter value |
setPreserveBaseUrlFile | public void setPreserveBaseUrlFile(boolean state)(Code) | | Set the "preserve URL file" flag
Parameters: state - true to preserve the URL file portion (default is false) |
setTransactionType | public void setTransactionType(String type)(Code) | | Set the transaction type
Parameters: type - (GET or POST) |
|
|