public class HttpBot extends Object
| Constructor and Description |
|---|
HttpBot()
do nothing, but keep in mind, that you have to setup the connection
|
HttpBot(HttpActionClient actionClient) |
HttpBot(String url) |
HttpBot(URL url) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes(String u)
Simple method to get plain HTML or XML data e.g. from custom specialpages or xml newsfeeds.
|
HttpActionClient |
getClient() |
String |
getHostUrl() |
static HttpBot |
getInstance()
Deprecated.
do not use this
|
String |
getPage(String u)
Simple method to get plain HTML or XML data e.g. from custom specialpages or xml newsfeeds.
|
String |
getUrl()
Deprecated.
|
static URL |
newURL(String url) |
String |
performAction(ContentProcessable a) |
void |
setClient(HttpActionClient client) |
void |
setClient(String hostUrl) |
void |
setClient(URL hostUrl) |
public HttpBot()
public HttpBot(String url)
url - of the hostpublic HttpBot(HttpActionClient actionClient)
public HttpBot(URL url)
url - of the host@Deprecated public static HttpBot getInstance()
HttpBot which supports only its basic methods. Use getPage(String)
for an basic read of content.public final void setClient(HttpActionClient client)
client - if you whant to add some specialspublic final void setClient(String hostUrl)
hostUrl - base url of a wiki site to connect with; example: http://www.yourOwnWiki.org/wiki/public final void setClient(URL hostUrl)
hostUrl - like http://www.yourOwnWiki.org/wiki/public final HttpActionClient getClient()
public final String getHostUrl()
public String performAction(ContentProcessable a)
public final String getPage(String u)
u - url like index.php?title=Main_Pagepublic final byte[] getBytes(String u)
u - url like index.php?title=Main_Page@Deprecated public String getUrl()
Copyright © 2013. All Rights Reserved.