public interface IHTTPRequest
| Modifier and Type | Field | Description |
|---|---|---|
static String |
HTTP_HEADER_X_FORWARDED_FOR |
|
static String |
HTTP_HEADER_X_REAL_IP |
|
static String |
PROPERTY_X_FORWARDED_LIST |
| Modifier and Type | Method | Description |
|---|---|---|
int |
getContentLength() |
Get the content length of the body of the message
|
String |
getContentType() |
Get the request content type
|
String |
getForwardedIP(String excludeAddresses) |
Get X-[real-forwarded] address
|
String |
getHeader(String name) |
Get a HTTP header value such as 'Content-Length'
|
byte[] |
getHeaderBytes() |
Returns the header as bytes
|
java.util.Map<String,String> |
getHeaderMap() |
Get a copy of the HTTP request header map
|
java.util.Set<String> |
getHeaderNames() |
Get a Set of the header names
|
String |
getHost() |
Returns the domain name and possibly the port of the server for which the HTTP Request is being sent to, for both HTTP 1.1 and HTTP 2.0
|
java.io.InputStream |
getInputStream() |
Get the body of the message as an input stream
|
int |
getIntHeader(String name) |
Get a HTTP header value such as 'Content-Length' and return as int
|
java.util.Locale |
getLocale() |
Get locale of request (Example: en-us)
|
String |
getMethod() |
Get the method invokation method: GET, POST, HEAD
|
byte[] |
getMsgBytes() |
Return the message bytes
|
String |
getParameter(String name) |
Get a parameter value
|
java.util.Map<String,java.util.List<String>> |
getParameterMap() |
Get the entire parameter Map
|
java.util.Set<String> |
getParameterNames() |
Get a Set of parameter names
|
String[] |
getParameterValues(String name) |
Get a multi-value parameter as an array of String
|
String |
getPath() |
Returns the HTTP path element of the request
|
String |
getProtocol() |
Get the request protocol (example: HTTP/1.1)
|
String |
getQueryString() |
Get the query string part of the url (everything after the ?)
|
String |
getRemoteAddr() |
Get the remote ip address of the request
|
String |
getRemoteHost() |
Get the remote host name (if known) if not return ip address
|
String |
getRequestURI() |
Get the full request URI
|
String |
getRequestURL() |
Get the request url (same as URI minus the query string)
|
String |
getScheme() |
Get the request scheme (Example "http")
|
String |
getServerName() |
Get the name of the server (Example: "Wowza Streaming Engine")
|
int |
getServerPort() |
Get the port this request was received on
|
boolean |
isHeadRequest() |
Returns true if the request is a HEAD request
|
boolean |
isSecure() |
Returns true is the request is protected by SSL
|
boolean |
isUpgradeRequest() |
Returns true if upgrade request (WebSocket,...)
|
void |
parseBodyForParams() |
If the body of the message contains parameter data (data in name value pairs separated by & character) call this
routine to decode those parameters and add them to the parameter map.
|
void |
parseBodyForParams(boolean doDecode) |
If the body of the message contains parameter data (data in name value pairs separated by & character) call this
routine to decode those parameters and add them to the parameter map.
|
static final String HTTP_HEADER_X_FORWARDED_FOR
static final String HTTP_HEADER_X_REAL_IP
static final String PROPERTY_X_FORWARDED_LIST
int getContentLength()
String getContentType()
String getForwardedIP(String excludeAddresses)
String getHeader(String name)
name - header namebyte[] getHeaderBytes()
java.util.Map<String,String> getHeaderMap()
java.util.Set<String> getHeaderNames()
String getHost()
java.io.InputStream getInputStream()
int getIntHeader(String name)
name - header namejava.util.Locale getLocale()
String getMethod()
byte[] getMsgBytes()
String getParameter(String name)
name - parameter namejava.util.Map<String,java.util.List<String>> getParameterMap()
java.util.Set<String> getParameterNames()
String[] getParameterValues(String name)
name - parameter nameString getPath()
String getProtocol()
String getQueryString()
String getRemoteAddr()
String getRemoteHost()
String getRequestURI()
String getRequestURL()
String getScheme()
String getServerName()
int getServerPort()
boolean isHeadRequest()
boolean isSecure()
boolean isUpgradeRequest()
void parseBodyForParams()
void parseBodyForParams(boolean doDecode)
doDecode - true to decode the params as though they are url params