|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HttpDownloadClient
Interface that represents HTTP robot - a client - for browsing pages. Robot emulates WebBrowser.
Method Summary | |
---|---|
String |
getContentAsString()
Method returns string content (web page - server response), which was gotten from the last GET or POST request |
org.apache.commons.httpclient.methods.GetMethod |
getGetMethod(String uri)
Returns setuble object for creation GET HTTP request |
org.apache.commons.httpclient.HttpClient |
getHTTPClient()
Method returns direct access to instance of HttpClient |
org.apache.commons.httpclient.methods.PostMethod |
getPostMethod(String uri)
Returns setuble object for creation POST HTTP request |
String |
getReferer()
Return value of HTTP referer from the last HTTP request |
ConnectionSettings |
getSettings()
Getter |
void |
initClient(ConnectionSettings settings)
Initialization of client with connection settings that should be used for creating http connection |
InputStream |
makeFinalRequestForFile(org.apache.commons.httpclient.HttpMethod method,
HttpFile file,
boolean allowRedirect)
Runs HTTP request to get file specified in file parameter. |
int |
makeRequest(org.apache.commons.httpclient.HttpMethod method,
boolean allowRedirect)
Runs simple HTTP request with optional redirect. |
InputStream |
makeRequestForFile(org.apache.commons.httpclient.HttpMethod method)
Runs simple direct HTTP request to get a file - eg. |
void |
setReferer(String referer)
Sets referer value for the next HTTP request This method should be called before getGetMethod or getPostMethod |
Method Detail |
---|
void initClient(ConnectionSettings settings)
settings
- internet connection settingsorg.apache.commons.httpclient.methods.PostMethod getPostMethod(String uri)
uri
- URI for given HTTP request
PostMethod
org.apache.commons.httpclient.methods.GetMethod getGetMethod(String uri)
uri
- URI for given HTTP request
GetMethod
String getReferer()
void setReferer(String referer)
referer
- URI for the next request made by method makeRequestInputStream makeFinalRequestForFile(org.apache.commons.httpclient.HttpMethod method, HttpFile file, boolean allowRedirect) throws IOException
method
- a descendant of HttpMethod - PostMethod or GetMethodfile
- the file that is downloadedallowRedirect
- allow redirect flag
IOException
- error I/OHttpClient.executeMethod(org.apache.commons.httpclient.HttpMethod)
InputStream makeRequestForFile(org.apache.commons.httpclient.HttpMethod method) throws IOException
method
- a descendant of HttpMethod - PostMethod or GetMethod
IOException
- error I/OHttpClient.executeMethod(org.apache.commons.httpclient.HttpMethod)
int makeRequest(org.apache.commons.httpclient.HttpMethod method, boolean allowRedirect) throws IOException
method
- a descendant of HttpMethod - PostMethod or GetMethodallowRedirect
- allow redirect flag
IOException
- error I/OHttpClient.executeMethod(org.apache.commons.httpclient.HttpMethod)
ConnectionSettings getSettings()
org.apache.commons.httpclient.HttpClient getHTTPClient()
HttpClient
String getContentAsString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |