Class Request
java.lang.Object
org.bonitasoft.connectors.rest.model.Request
This class reflects the information for a REST request.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a cookie couple in the cookies.booleanAdd a header couple in the headers.Authorization value getter.getBody()Body value getter.org.apache.http.entity.ContentTypeCookies value getter.List<org.apache.http.Header>Headers value getter.getProxy()Proxy value getter.RESTHTTPMethod value getter.getSsl()SSL value getter.getUrl()URL value getter.booleanhasBody()booleanisIgnore()Ignore value getter.booleanRedirect value getter.voidsetAuthorization(Authorization authorization) Authorization value setter.voidsetBody(Serializable body) Body value setter.voidsetContentType(org.apache.http.entity.ContentType contentType) voidsetHasBody(boolean hasBody) booleanSet a header couple in the headers after removal of previous existing headers with the same key.voidsetIgnore(boolean ignore) Ignore value setter.voidProxy value setter.voidsetRedirect(boolean redirect) Redirect value setter.voidsetRestMethod(HTTPMethod restMethod) RESTHTTPMethod value setter.voidSSL value setter.voidThe URL value setter.toString()
-
Constructor Details
-
Request
public Request()
-
-
Method Details
-
getUrl
URL value getter.- Returns:
- The URL value.
-
setUrl
The URL value setter.- Parameters:
url- URL value.
-
getRestMethod
RESTHTTPMethod value getter.- Returns:
- The RESTHTTPMethod value.
-
setRestMethod
RESTHTTPMethod value setter.- Parameters:
restMethod- The RESTHTTPMethod new value.
-
getAuthorization
Authorization value getter.- Returns:
- The authorization value.
-
setAuthorization
Authorization value setter.- Parameters:
authorization- The authorization new value.
-
getSsl
SSL value getter.- Returns:
- The SSL value.
-
setSsl
SSL value setter.- Parameters:
ssl- The SSL new value.
-
getProxy
Proxy value getter.- Returns:
- The Proxy value.
-
setProxy
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
Headers value getter.- Returns:
- The headers value.
-
getCookies
Cookies value getter.- Returns:
- The cookies value.
-
addHeader
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.
-
setHeader
Set a header couple in the headers after removal of previous existing headers with the same key.- 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
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
Body value getter.- Returns:
- The body value.
-
setBody
Body value setter.- Parameters:
body- The body new value.
-
hasBody
public boolean hasBody() -
setHasBody
public void setHasBody(boolean hasBody) -
setContentType
public void setContentType(org.apache.http.entity.ContentType contentType) -
getContentType
public org.apache.http.entity.ContentType getContentType() -
toString
-