|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.oauth.http.HttpMessage
public class HttpMessage
An HTTP request or response.
Field Summary | |
---|---|
static java.lang.String |
ACCEPT_ENCODING
|
protected java.io.InputStream |
body
|
static java.lang.String |
CONTENT_ENCODING
|
static java.lang.String |
CONTENT_LENGTH
|
static java.lang.String |
CONTENT_TYPE
|
static java.lang.String |
DEFAULT_CHARSET
|
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> |
headers
|
java.lang.String |
method
|
static java.lang.String |
REQUEST
The name of a dump entry whose value is the HTTP request. |
static java.lang.String |
RESPONSE
The name of a dump entry whose value is the HTTP response. |
static java.lang.String |
STATUS_CODE
The name of a dump entry whose value is the HTTP status code. |
java.net.URL |
url
|
Constructor Summary | |
---|---|
HttpMessage()
|
|
HttpMessage(java.lang.String method,
java.net.URL url)
|
|
HttpMessage(java.lang.String method,
java.net.URL url,
java.io.InputStream body)
|
Method Summary | |
---|---|
void |
dump(java.util.Map<java.lang.String,java.lang.Object> into)
Put a description of this message and its origins into the given Map. |
java.io.InputStream |
getBody()
|
java.lang.String |
getContentCharset()
|
java.lang.String |
getHeader(java.lang.String name)
Get the value of the last header of the given name. |
static HttpMessage |
newRequest(OAuthMessage from,
ParameterStyle style)
Construct an HTTP request from this OAuth message. |
protected java.io.InputStream |
openBody()
|
java.lang.String |
removeHeaders(java.lang.String name)
Remove all headers of the given name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String method
public java.net.URL url
public final java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> headers
protected java.io.InputStream body
public static final java.lang.String REQUEST
public static final java.lang.String RESPONSE
public static final java.lang.String STATUS_CODE
public static final java.lang.String ACCEPT_ENCODING
public static final java.lang.String CONTENT_ENCODING
public static final java.lang.String CONTENT_LENGTH
public static final java.lang.String CONTENT_TYPE
public static final java.lang.String DEFAULT_CHARSET
Constructor Detail |
---|
public HttpMessage()
public HttpMessage(java.lang.String method, java.net.URL url)
public HttpMessage(java.lang.String method, java.net.URL url, java.io.InputStream body)
Method Detail |
---|
public final java.lang.String getHeader(java.lang.String name)
public java.lang.String removeHeaders(java.lang.String name)
public final java.lang.String getContentCharset()
public final java.io.InputStream getBody() throws java.io.IOException
java.io.IOException
protected java.io.InputStream openBody() throws java.io.IOException
java.io.IOException
public void dump(java.util.Map<java.lang.String,java.lang.Object> into) throws java.io.IOException
java.io.IOException
public static HttpMessage newRequest(OAuthMessage from, ParameterStyle style) throws java.io.IOException
style
- where to put the OAuth parameters, within the HTTP request
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |