Class Request
- java.lang.Object
-
- org.bonitasoft.connectors.rest.model.Request
-
public class Request extends Object
This class reflects the information for a REST request.
-
-
Constructor Summary
Constructors Constructor Description Request()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddCookie(String key, String value)Add a cookie couple in the cookies.booleanaddHeader(String key, String value)Add a header couple in the headers.AuthorizationgetAuthorization()Authorization value getter.SerializablegetBody()Body value getter.org.apache.http.entity.ContentTypegetContentType()List<HttpCookie>getCookies()Cookies value getter.List<org.apache.http.Header>getHeaders()Headers value getter.ProxygetProxy()Proxy value getter.HTTPMethodgetRestMethod()RESTHTTPMethod value getter.SSLgetSsl()SSL value getter.URLgetUrl()URL value getter.booleanisIgnore()Ignore value getter.booleanisRedirect()Redirect value getter.voidsetAuthorization(Authorization authorization)Authorization value setter.voidsetBody(Serializable body)Body value setter.voidsetContentType(org.apache.http.entity.ContentType contentType)voidsetIgnore(boolean ignore)Ignore value setter.voidsetProxy(Proxy proxy)Proxy value setter.voidsetRedirect(boolean redirect)Redirect value setter.voidsetRestMethod(HTTPMethod restMethod)RESTHTTPMethod value setter.voidsetSsl(SSL ssl)SSL value setter.voidsetUrl(URL url)The URL value setter.StringtoString()
-
-
-
Method Detail
-
getUrl
public URL getUrl()
URL value getter.- Returns:
- The URL value.
-
setUrl
public void setUrl(URL url)
The URL value setter.- Parameters:
url- URL value.
-
getRestMethod
public HTTPMethod getRestMethod()
RESTHTTPMethod value getter.- Returns:
- The RESTHTTPMethod value.
-
setRestMethod
public void setRestMethod(HTTPMethod restMethod)
RESTHTTPMethod value setter.- Parameters:
restMethod- The RESTHTTPMethod new value.
-
getAuthorization
public Authorization getAuthorization()
Authorization value getter.- Returns:
- The authorization value.
-
setAuthorization
public void setAuthorization(Authorization authorization)
Authorization value setter.- Parameters:
authorization- The authorization new value.
-
getSsl
public SSL getSsl()
SSL value getter.- Returns:
- The SSL value.
-
setSsl
public void setSsl(SSL ssl)
SSL value setter.- Parameters:
ssl- The SSL new value.
-
getProxy
public Proxy getProxy()
Proxy value getter.- Returns:
- The Proxy value.
-
setProxy
public void setProxy(Proxy proxy)
Proxy value setter.- Parameters:
proxy- The Proxy new value.
-
isRedirect
public boolean isRedirect()
Redirect value getter.- Returns:
- The redirect value.
-
setRedirect
public void setRedirect(boolean redirect)
Redirect value setter.- Parameters:
redirect- The redirect new value.
-
isIgnore
public boolean isIgnore()
Ignore value getter.- Returns:
- The ignore value.
-
setIgnore
public void setIgnore(boolean ignore)
Ignore value setter.- Parameters:
ignore- The ignore new value.
-
getHeaders
public List<org.apache.http.Header> getHeaders()
Headers value getter.- Returns:
- The headers value.
-
getCookies
public List<HttpCookie> getCookies()
Cookies value getter.- Returns:
- The cookies value.
-
addHeader
public boolean addHeader(String key, String value)
Add a header couple in the headers.- Parameters:
key- The key of the new header.value- The lonely value of the new header.- Returns:
- True if the header has been added or false otherwise.
-
addCookie
public boolean addCookie(String key, String value)
Add a cookie couple in the cookies.- Parameters:
key- The key of the new cookie.value- The lonely value of the new cookie.- Returns:
- True if the cookie has been added or false otherwise.
-
getBody
public Serializable getBody()
Body value getter.- Returns:
- The body value.
-
setBody
public void setBody(Serializable body)
Body value setter.- Parameters:
body- The body new value.
-
setContentType
public void setContentType(org.apache.http.entity.ContentType contentType)
-
getContentType
public org.apache.http.entity.ContentType getContentType()
-
-