@ProviderType
public interface Http
Modifier and Type | Interface and Description |
---|---|
static class |
Http.Auth |
static class |
Http.Body |
static class |
Http.FilePart |
static class |
Http.Method |
static class |
Http.Options |
static class |
Http.Response |
Modifier and Type | Field and Description |
---|---|
static String |
HTTP |
static int |
HTTP_PORT |
static String |
HTTP_WITH_SLASH |
static String |
HTTPS |
static int |
HTTPS_PORT |
static String |
HTTPS_WITH_SLASH |
static String |
PROTOCOL_DELIMITER |
static int |
URL_MAXIMUM_LENGTH |
Modifier and Type | Method and Description |
---|---|
String |
addParameter(String url,
String name,
boolean value) |
String |
addParameter(String url,
String name,
double value) |
String |
addParameter(String url,
String name,
int value) |
String |
addParameter(String url,
String name,
long value) |
String |
addParameter(String url,
String name,
short value) |
String |
addParameter(String url,
String name,
String value) |
String |
decodePath(String path) |
String |
decodeURL(String url) |
String |
decodeURL(String url,
boolean unescapeSpaces)
Deprecated.
As of Wilberforce (7.0.x), replaced by
decodeURL(String) |
String |
encodeParameters(String url) |
String |
encodePath(String path) |
String |
encodeURL(String url)
Deprecated.
As of Judson (7.1.x), replaced by
URLCodec.encodeURL(String) |
String |
encodeURL(String url,
boolean escapeSpaces)
Deprecated.
As of Judson (7.1.x), replaced by
URLCodec.encodeURL(String, boolean) |
String |
fixPath(String path) |
String |
fixPath(String path,
boolean leading,
boolean trailing) |
String |
getCompleteURL(javax.servlet.http.HttpServletRequest request) |
javax.servlet.http.Cookie[] |
getCookies() |
String |
getDomain(String url) |
String |
getIpAddress(String url) |
String |
getParameter(String url,
String name) |
String |
getParameter(String url,
String name,
boolean escaped) |
Map<String,String[]> |
getParameterMap(String queryString) |
String |
getPath(String url) |
String |
getProtocol(javax.portlet.ActionRequest actionRequest) |
String |
getProtocol(boolean secure) |
String |
getProtocol(javax.servlet.http.HttpServletRequest request) |
String |
getProtocol(javax.portlet.RenderRequest renderRequest) |
String |
getProtocol(String url) |
String |
getQueryString(String url) |
String |
getRequestURL(javax.servlet.http.HttpServletRequest request) |
boolean |
hasDomain(String url) |
boolean |
hasProtocol(String url) |
boolean |
hasProxyConfig() |
boolean |
isNonProxyHost(String host) |
boolean |
isProxyHost(String host) |
boolean |
isSecure(String url) |
String |
normalizePath(String uri) |
Map<String,String[]> |
parameterMapFromString(String queryString) |
String |
parameterMapToString(Map<String,String[]> parameterMap) |
String |
parameterMapToString(Map<String,String[]> parameterMap,
boolean addQuestion) |
String |
protocolize(String url,
javax.portlet.ActionRequest actionRequest) |
String |
protocolize(String url,
boolean secure) |
String |
protocolize(String url,
javax.servlet.http.HttpServletRequest request) |
String |
protocolize(String url,
int port,
boolean secure) |
String |
protocolize(String url,
javax.portlet.RenderRequest renderRequest) |
String |
removeDomain(String url) |
String |
removeParameter(String url,
String name) |
String |
removePathParameters(String uri) |
String |
removeProtocol(String url) |
String |
sanitizeHeader(String header) |
String |
setParameter(String url,
String name,
boolean value) |
String |
setParameter(String url,
String name,
double value) |
String |
setParameter(String url,
String name,
int value) |
String |
setParameter(String url,
String name,
long value) |
String |
setParameter(String url,
String name,
short value) |
String |
setParameter(String url,
String name,
String value) |
String |
shortenURL(String url) |
String |
shortenURL(String url,
int count)
Deprecated.
As of Judson (7.1.x), replaced by
shortenURL(String) |
byte[] |
URLtoByteArray(Http.Options options) |
byte[] |
URLtoByteArray(String location) |
byte[] |
URLtoByteArray(String location,
boolean post) |
InputStream |
URLtoInputStream(Http.Options options) |
InputStream |
URLtoInputStream(String location) |
InputStream |
URLtoInputStream(String location,
boolean post) |
String |
URLtoString(Http.Options options) |
String |
URLtoString(String location) |
String |
URLtoString(String location,
boolean post) |
String |
URLtoString(URL url)
This method only uses the default Commons HttpClient implementation when
the URL object represents a HTTP resource.
|
static final String HTTP
static final int HTTP_PORT
static final String HTTP_WITH_SLASH
static final String HTTPS
static final int HTTPS_PORT
static final String HTTPS_WITH_SLASH
static final String PROTOCOL_DELIMITER
static final int URL_MAXIMUM_LENGTH
String addParameter(String url, String name, boolean value)
String addParameter(String url, String name, double value)
String addParameter(String url, String name, int value)
String addParameter(String url, String name, long value)
String addParameter(String url, String name, short value)
String addParameter(String url, String name, String value)
String decodePath(String path)
String decodeURL(String url)
@Deprecated String decodeURL(String url, boolean unescapeSpaces)
decodeURL(String)
String encodeParameters(String url)
String encodePath(String path)
@Deprecated String encodeURL(String url)
URLCodec.encodeURL(String)
@Deprecated String encodeURL(String url, boolean escapeSpaces)
URLCodec.encodeURL(String, boolean)
String fixPath(String path)
String fixPath(String path, boolean leading, boolean trailing)
String getCompleteURL(javax.servlet.http.HttpServletRequest request)
javax.servlet.http.Cookie[] getCookies()
String getDomain(String url)
String getIpAddress(String url)
String getParameter(String url, String name)
String getParameter(String url, String name, boolean escaped)
Map<String,String[]> getParameterMap(String queryString)
String getPath(String url)
String getProtocol(javax.portlet.ActionRequest actionRequest)
String getProtocol(boolean secure)
String getProtocol(javax.servlet.http.HttpServletRequest request)
String getProtocol(javax.portlet.RenderRequest renderRequest)
String getProtocol(String url)
String getQueryString(String url)
String getRequestURL(javax.servlet.http.HttpServletRequest request)
boolean hasDomain(String url)
boolean hasProtocol(String url)
boolean hasProxyConfig()
boolean isNonProxyHost(String host)
boolean isProxyHost(String host)
boolean isSecure(String url)
String normalizePath(String uri)
Map<String,String[]> parameterMapFromString(String queryString)
String parameterMapToString(Map<String,String[]> parameterMap)
String parameterMapToString(Map<String,String[]> parameterMap, boolean addQuestion)
String protocolize(String url, javax.portlet.ActionRequest actionRequest)
String protocolize(String url, boolean secure)
String protocolize(String url, javax.servlet.http.HttpServletRequest request)
String protocolize(String url, int port, boolean secure)
String protocolize(String url, javax.portlet.RenderRequest renderRequest)
String removeDomain(String url)
String removeParameter(String url, String name)
String removePathParameters(String uri)
String removeProtocol(String url)
String sanitizeHeader(String header)
String setParameter(String url, String name, boolean value)
String setParameter(String url, String name, double value)
String setParameter(String url, String name, int value)
String setParameter(String url, String name, long value)
String setParameter(String url, String name, short value)
String setParameter(String url, String name, String value)
String shortenURL(String url)
@Deprecated String shortenURL(String url, int count)
shortenURL(String)
byte[] URLtoByteArray(Http.Options options) throws IOException
IOException
byte[] URLtoByteArray(String location) throws IOException
IOException
byte[] URLtoByteArray(String location, boolean post) throws IOException
IOException
InputStream URLtoInputStream(Http.Options options) throws IOException
IOException
InputStream URLtoInputStream(String location) throws IOException
IOException
InputStream URLtoInputStream(String location, boolean post) throws IOException
IOException
String URLtoString(Http.Options options) throws IOException
IOException
String URLtoString(String location) throws IOException
IOException
String URLtoString(String location, boolean post) throws IOException
IOException
String URLtoString(URL url) throws IOException
url
- the URLIOException
- if an IO exception occurred