com.liferay.portal.kernel.util
Interface Http
public interface Http
Method Summary |
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)
|
String |
encodeParameters(String url)
|
String |
encodePath(String path)
|
String |
encodeURL(String url)
|
String |
encodeURL(String url,
boolean escapeSpaces)
|
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(ActionRequest actionRequest)
|
String |
getProtocol(boolean secure)
|
String |
getProtocol(javax.servlet.http.HttpServletRequest request)
|
String |
getProtocol(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)
|
Map<String,String[]> |
parameterMapFromString(String queryString)
|
String |
parameterMapToString(Map<String,String[]> parameterMap)
|
String |
parameterMapToString(Map<String,String[]> parameterMap,
boolean addQuestion)
|
String |
protocolize(String url,
ActionRequest actionRequest)
|
String |
protocolize(String url,
boolean secure)
|
String |
protocolize(String url,
javax.servlet.http.HttpServletRequest request)
|
String |
protocolize(String url,
RenderRequest renderRequest)
|
String |
removeDomain(String url)
|
String |
removeParameter(String url,
String name)
|
String |
removeProtocol(String url)
|
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)
|
byte[] |
URLtoByteArray(Http.Options options)
|
byte[] |
URLtoByteArray(String location)
|
byte[] |
URLtoByteArray(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. |
HTTP
static final String HTTP
- See Also:
- Constant Field Values
HTTP_PORT
static final int HTTP_PORT
- See Also:
- Constant Field Values
HTTP_WITH_SLASH
static final String HTTP_WITH_SLASH
- See Also:
- Constant Field Values
HTTPS
static final String HTTPS
- See Also:
- Constant Field Values
HTTPS_PORT
static final int HTTPS_PORT
- See Also:
- Constant Field Values
HTTPS_WITH_SLASH
static final String HTTPS_WITH_SLASH
- See Also:
- Constant Field Values
PROTOCOL_DELIMITER
static final String PROTOCOL_DELIMITER
- See Also:
- Constant Field Values
addParameter
String addParameter(String url,
String name,
boolean value)
addParameter
String addParameter(String url,
String name,
double value)
addParameter
String addParameter(String url,
String name,
int value)
addParameter
String addParameter(String url,
String name,
long value)
addParameter
String addParameter(String url,
String name,
short value)
addParameter
String addParameter(String url,
String name,
String value)
decodePath
String decodePath(String path)
decodeURL
String decodeURL(String url)
decodeURL
String decodeURL(String url,
boolean unescapeSpaces)
encodeParameters
String encodeParameters(String url)
encodePath
String encodePath(String path)
encodeURL
String encodeURL(String url)
encodeURL
String encodeURL(String url,
boolean escapeSpaces)
fixPath
String fixPath(String path)
fixPath
String fixPath(String path,
boolean leading,
boolean trailing)
getCompleteURL
String getCompleteURL(javax.servlet.http.HttpServletRequest request)
getCookies
javax.servlet.http.Cookie[] getCookies()
getDomain
String getDomain(String url)
getIpAddress
String getIpAddress(String url)
getParameter
String getParameter(String url,
String name)
getParameter
String getParameter(String url,
String name,
boolean escaped)
getParameterMap
Map<String,String[]> getParameterMap(String queryString)
getPath
String getPath(String url)
getProtocol
String getProtocol(ActionRequest actionRequest)
getProtocol
String getProtocol(boolean secure)
getProtocol
String getProtocol(javax.servlet.http.HttpServletRequest request)
getProtocol
String getProtocol(RenderRequest renderRequest)
getProtocol
String getProtocol(String url)
getQueryString
String getQueryString(String url)
getRequestURL
String getRequestURL(javax.servlet.http.HttpServletRequest request)
hasDomain
boolean hasDomain(String url)
hasProtocol
boolean hasProtocol(String url)
hasProxyConfig
boolean hasProxyConfig()
isNonProxyHost
boolean isNonProxyHost(String host)
isProxyHost
boolean isProxyHost(String host)
parameterMapFromString
Map<String,String[]> parameterMapFromString(String queryString)
parameterMapToString
String parameterMapToString(Map<String,String[]> parameterMap)
parameterMapToString
String parameterMapToString(Map<String,String[]> parameterMap,
boolean addQuestion)
protocolize
String protocolize(String url,
ActionRequest actionRequest)
protocolize
String protocolize(String url,
boolean secure)
protocolize
String protocolize(String url,
javax.servlet.http.HttpServletRequest request)
protocolize
String protocolize(String url,
RenderRequest renderRequest)
removeDomain
String removeDomain(String url)
removeParameter
String removeParameter(String url,
String name)
removeProtocol
String removeProtocol(String url)
setParameter
String setParameter(String url,
String name,
boolean value)
setParameter
String setParameter(String url,
String name,
double value)
setParameter
String setParameter(String url,
String name,
int value)
setParameter
String setParameter(String url,
String name,
long value)
setParameter
String setParameter(String url,
String name,
short value)
setParameter
String setParameter(String url,
String name,
String value)
URLtoByteArray
byte[] URLtoByteArray(Http.Options options)
throws IOException
- Throws:
IOException
URLtoByteArray
byte[] URLtoByteArray(String location)
throws IOException
- Throws:
IOException
URLtoByteArray
byte[] URLtoByteArray(String location,
boolean post)
throws IOException
- Throws:
IOException
URLtoString
String URLtoString(Http.Options options)
throws IOException
- Throws:
IOException
URLtoString
String URLtoString(String location)
throws IOException
- Throws:
IOException
URLtoString
String URLtoString(String location,
boolean post)
throws IOException
- Throws:
IOException
URLtoString
String URLtoString(URL url)
throws IOException
- This method only uses the default Commons HttpClient implementation when
the URL object represents a HTTP resource. The URL object could also
represent a file or some JNDI resource. In that case, the default Java
implementation is used.
- Returns:
- A string representation of the resource referenced by the URL
object
- Throws:
IOException