public class Proxy extends HttpObject
DEFAULT_HTTP_ENCODING, MOST_WIDELY_SUPPORTED_ENCODING| Constructor and Description |
|---|
Proxy(java.lang.String base,
java.lang.String me) |
Proxy(java.lang.String localPath,
java.lang.String base,
java.lang.String me) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRequestHeaders(Request req,
org.apache.commons.httpclient.HttpMethodBase method) |
protected org.apache.commons.httpclient.HttpClient |
createHttpClient() |
protected Response |
createResponse(org.apache.commons.httpclient.HttpMethodBase method,
ResponseCode responseCode,
java.util.List<HeaderField> headersReturned) |
Response |
delete(Request req) |
protected Response |
executeMethod(org.apache.commons.httpclient.HttpClient client,
org.apache.commons.httpclient.HttpMethodBase method,
Request req) |
protected java.util.List<HeaderField> |
extractResponseHeaders(org.apache.commons.httpclient.HttpMethodBase method) |
Response |
get(Request req) |
java.lang.String |
getBase() |
protected java.lang.String |
getQuery(Request req) |
Response |
post(Request req) |
protected java.lang.String |
processRedirect(java.lang.String url) |
protected java.lang.String |
processUrl(java.lang.String url) |
protected Response |
proxyRequest(Request req,
org.apache.commons.httpclient.HttpMethodBase method) |
Response |
put(Request req) |
void |
setBase(java.lang.String base) |
protected void |
setRequestRepresentation(Request req,
org.apache.commons.httpclient.methods.EntityEnclosingMethod method) |
protected static java.lang.String |
stripTrailingSlash(java.lang.String text) |
BAD_GATEWAY, BAD_GATEWAY, BAD_GATEWAY, BAD_REQUEST, BAD_REQUEST, BasicAuthentication, Bytes, Bytes, classpathResourcesAt, CONFLICT, CONFLICT, CONTINUE, CREATED, EXPECTATION_FAILED, EXPECTATION_FAILED, File, FORBIDDEN, FORBIDDEN, FromClasspath, FromClasspath, GATEWAY_TIMEOUT, GATEWAY_TIMEOUT, GATEWAY_TIMEOUT, getBytes, GONE, GONE, Html, HtmlFromClasspath, HtmlFromClasspath, HTTP_VERSION_NOT_SUPPORTED, HTTP_VERSION_NOT_SUPPORTED, HTTP_VERSION_NOT_SUPPORTED, INTERNAL_SERVER_ERROR, INTERNAL_SERVER_ERROR, INTERNAL_SERVER_ERROR, Json, LENGTH_REQUIRED, LENGTH_REQUIRED, Location, METHOD_NOT_ALLOWED, METHOD_NOT_ALLOWED, METHOD_NOT_ALLOWED, METHOD_NOT_ALLOWED, NO_CONTENT, NOT_ACCEPTABLE, NOT_ACCEPTABLE, NOT_FOUND, NOT_FOUND, NOT_IMPLEMENTED, NOT_IMPLEMENTED, NOT_IMPLEMENTED, OK, PAYMENT_REQUIRED, PAYMENT_REQUIRED, PRECONDITION_FAILED, PRECONDITION_FAILED, PROXY_AUTHENTICATION_REQUIRED, PROXY_AUTHENTICATION_REQUIRED, REQUEST_ENTITY_TOO_LARGE, REQUEST_ENTITY_TOO_LARGE, REQUEST_TIMEOUT, REQUEST_TIMEOUT, REQUEST_URI_TOO_LONG, REQUEST_URI_TOO_LONG, REQUESTED_RANGE_NOT_SATISFIABLE, REQUESTED_RANGE_NOT_SATISFIABLE, SEE_OTHER, SEE_OTHER, SERVICE_UNAVAILABLE, SERVICE_UNAVAILABLE, SERVICE_UNAVAILABLE, SetCookie, SWITCHING_PROTOCOLS, Text, UNAUTHORIZED, UNAUTHORIZED, UNAUTHORIZED, UNSUPPORTED_MEDIA_TYPE, UNSUPPORTED_MEDIA_TYPEpublic Proxy(java.lang.String localPath,
java.lang.String base,
java.lang.String me)
public Proxy(java.lang.String base,
java.lang.String me)
public void setBase(java.lang.String base)
public java.lang.String getBase()
public Response get(Request req)
get in class HttpObjectpublic Response delete(Request req)
delete in class HttpObjectpublic Response put(Request req)
put in class HttpObjectprotected void setRequestRepresentation(Request req, org.apache.commons.httpclient.methods.EntityEnclosingMethod method)
public Response post(Request req)
post in class HttpObjectprotected java.lang.String getQuery(Request req)
protected java.lang.String processUrl(java.lang.String url)
protected Response proxyRequest(Request req, org.apache.commons.httpclient.HttpMethodBase method)
protected Response executeMethod(org.apache.commons.httpclient.HttpClient client, org.apache.commons.httpclient.HttpMethodBase method, Request req)
protected org.apache.commons.httpclient.HttpClient createHttpClient()
protected void addRequestHeaders(Request req, org.apache.commons.httpclient.HttpMethodBase method)
protected java.util.List<HeaderField> extractResponseHeaders(org.apache.commons.httpclient.HttpMethodBase method)
protected java.lang.String processRedirect(java.lang.String url)
protected Response createResponse(org.apache.commons.httpclient.HttpMethodBase method, ResponseCode responseCode, java.util.List<HeaderField> headersReturned)
protected static final java.lang.String stripTrailingSlash(java.lang.String text)
Copyright © 2015. All Rights Reserved.