public abstract class AbstractRequester extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Charset |
charset |
protected org.apache.http.client.HttpClient |
client |
protected Map<String,String> |
requestProperties |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRequester() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getBody(org.apache.http.HttpResponse response) |
Charset |
getCharset()
Getter for charset.
|
static String |
getCodes(String table)
Return the available codes from the specified table.
|
protected org.apache.http.HttpResponse |
getResponse(org.apache.http.client.methods.HttpRequestBase request) |
abstract String |
getResponse(String url)
Returns the response as a string.
|
void |
setCharset(Charset charset)
Setter for charset.
|
protected Charset charset
protected org.apache.http.client.HttpClient client
protected org.apache.http.HttpResponse getResponse(org.apache.http.client.methods.HttpRequestBase request)
protected String getBody(org.apache.http.HttpResponse response)
public static String getCodes(String table)
table - the table to fetch the codes frompublic abstract String getResponse(String url)
url - the URL to get the response frompublic Charset getCharset()
public void setCharset(Charset charset)
charset - the charsetCopyright © 2016. All rights reserved.