|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.fascinator.common.BasicHttpClient
public class BasicHttpClient
Commons HttpClient wrapper that makes it easier to work with proxies and authentication
| Constructor Summary | |
|---|---|
BasicHttpClient(java.lang.String baseUrl)
Creates an HTTP client for the specified base URL. |
|
| Method Summary | |
|---|---|
void |
authenticate(java.lang.String username,
java.lang.String password)
Sets the authentication credentials for authenticated requests |
int |
executeMethod(org.apache.commons.httpclient.HttpMethodBase method)
Sends an HTTP request. |
int |
executeMethod(org.apache.commons.httpclient.HttpMethodBase method,
boolean auth)
Sends an HTTP request |
java.lang.String |
getBaseUrl()
Gets the base URL |
org.apache.commons.httpclient.HttpClient |
getHttpClient(boolean auth)
Gets an HTTP client. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicHttpClient(java.lang.String baseUrl)
baseUrl - the base URL| Method Detail |
|---|
public void authenticate(java.lang.String username,
java.lang.String password)
username - a usernamepassword - a passwordpublic org.apache.commons.httpclient.HttpClient getHttpClient(boolean auth)
auth - set true to use authentication, false to skip authentication
public java.lang.String getBaseUrl()
public int executeMethod(org.apache.commons.httpclient.HttpMethodBase method)
throws java.io.IOException
method - an HTTP method
java.io.IOException - if an error occurred during the HTTP request
public int executeMethod(org.apache.commons.httpclient.HttpMethodBase method,
boolean auth)
throws java.io.IOException
method - an HTTP methodauth - true to request with authentication, false to request without
java.io.IOException - if an error occurred during the HTTP request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||