Package net.oauth.server
Class HttpRequestMessage
- java.lang.Object
-
- net.oauth.OAuthMessage
-
- net.oauth.server.HttpRequestMessage
-
public class HttpRequestMessage extends OAuthMessage
An HttpServletRequest, encapsulated as an OAuthMessage.- Author:
- John Kristian
-
-
Field Summary
-
Fields inherited from class net.oauth.OAuthMessage
AUTH_SCHEME, DELETE, GET, method, POST, PUT, URL
-
-
Constructor Summary
Constructors Constructor Description HttpRequestMessage(HttpServletRequest request, String URL)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamgetBodyAsStream()Get a stream from which to read the body of the HTTP request or response.StringgetBodyEncoding()The character encoding of the body of this message.static List<OAuth.Parameter>getParameters(HttpServletRequest request)-
Methods inherited from class net.oauth.OAuthMessage
addParameter, addParameter, addParameters, addRequiredParameters, completeParameters, decodeAuthorization, dump, getAuthorizationHeader, getBodyType, getConsumerKey, getDump, getHeader, getHeaders, getParameter, getParameterMap, getParameters, getSignature, getSignatureMethod, getToken, readAll, readBodyAsString, requireParameters, sign, toHttpRequest, toString, validateMessage
-
-
-
-
Constructor Detail
-
HttpRequestMessage
public HttpRequestMessage(HttpServletRequest request, String URL)
-
-
Method Detail
-
getBodyAsStream
public InputStream getBodyAsStream() throws IOException
Description copied from class:OAuthMessageGet a stream from which to read the body of the HTTP request or response. This is designed to support efficient streaming of a large message. The caller must close the returned stream, to release the underlying resources such as the TCP connection for an HTTP response.- Overrides:
getBodyAsStreamin classOAuthMessage- Returns:
- a stream from which to read the body, or null to indicate there is no body.
- Throws:
IOException
-
getBodyEncoding
public String getBodyEncoding()
Description copied from class:OAuthMessageThe character encoding of the body of this message.- Overrides:
getBodyEncodingin classOAuthMessage- Returns:
- the name of an encoding, or "ISO-8859-1" if no charset has been specified.
-
getParameters
public static List<OAuth.Parameter> getParameters(HttpServletRequest request)
-
-