|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.seam.social.scribe.OAuthRequestScribe
public class OAuthRequestScribe
Constructor Summary | |
---|---|
OAuthRequestScribe(RestVerb verb,
String url)
|
Method Summary | |
---|---|
void |
addBodyParameter(String key,
String value)
Add a body Parameter (for POST/ PUT Requests) |
void |
addHeader(String key,
String value)
Add an HTTP Header to the Request |
void |
addOAuthParameter(String key,
String value)
Adds an OAuth parameter. |
void |
addPayload(String payload)
Add body payload. |
void |
addQuerystringParameter(String key,
String value)
Add a QueryString parameter |
boolean |
equals(Object obj)
|
String |
getBodyContents()
|
Map<String,String> |
getBodyParams()
Obtains a Map of the body parameters. |
Map<String,String> |
getHeaders()
Returns the connection headers as a Map |
Map<String,String> |
getOauthParameters()
Returns the Map containing the key-value pair of parameters. |
Map<String,String> |
getQueryStringParams()
Get a Map of the query string parameters. |
String |
getSanitizedUrl()
Returns the URL without the port and the query string part. |
String |
getUrl()
Obtains the URL of the HTTP Request. |
RestVerb |
getVerb()
|
int |
hashCode()
|
RestResponse |
send()
Execute the request and return a HttpResonse |
void |
setConnectTimeout(int duration,
TimeUnit unit)
Sets the connect timeout for the underlying HttpURLConnection |
void |
setReadTimeout(int duration,
TimeUnit unit)
Sets the read timeout for the underlying HttpURLConnection |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OAuthRequestScribe(RestVerb verb, String url)
verb
- uri
- Method Detail |
---|
public void addOAuthParameter(String key, String value)
OAuthRequest
addOAuthParameter
in interface OAuthRequest
value
- value of the parameterpublic RestResponse send()
RestRequest
HttpResonse
send
in interface RestRequest
public Map<String,String> getOauthParameters()
OAuthRequest
Map
containing the key-value pair of parameters.
getOauthParameters
in interface OAuthRequest
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public void addHeader(String key, String value)
RestRequest
addHeader
in interface RestRequest
key
- the header namevalue
- the header valuepublic void addBodyParameter(String key, String value)
RestRequest
addBodyParameter
in interface RestRequest
key
- the parameter namevalue
- the parameter valuepublic void addQuerystringParameter(String key, String value)
RestRequest
addQuerystringParameter
in interface RestRequest
key
- the parameter namevalue
- the parameter valuepublic void addPayload(String payload)
RestRequest
addPayload
in interface RestRequest
payload
- the body of the requestpublic Map<String,String> getQueryStringParams()
RestRequest
Map
of the query string parameters.
getQueryStringParams
in interface RestRequest
public boolean equals(Object obj)
equals
in class Object
public Map<String,String> getBodyParams()
RestRequest
Map
of the body parameters.
getBodyParams
in interface RestRequest
public String getUrl()
RestRequest
getUrl
in interface RestRequest
public String getSanitizedUrl()
RestRequest
getSanitizedUrl
in interface RestRequest
public String getBodyContents()
getBodyContents
in interface RestRequest
public RestVerb getVerb()
getVerb
in interface RestRequest
public Map<String,String> getHeaders()
RestRequest
Map
getHeaders
in interface RestRequest
public void setConnectTimeout(int duration, TimeUnit unit)
RestRequest
HttpURLConnection
setConnectTimeout
in interface RestRequest
duration
- duration of the timeoutunit
- unit of time (milliseconds, seconds, etc)public void setReadTimeout(int duration, TimeUnit unit)
RestRequest
HttpURLConnection
setReadTimeout
in interface RestRequest
duration
- duration of the timeoutunit
- unit of time (milliseconds, seconds, etc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |