Package org.apereo.cas.util.http
Class HttpMessage
java.lang.Object
org.apereo.cas.util.http.HttpMessage
- All Implemented Interfaces:
Serializable
This is
HttpMessage
.- Since:
- 5.0.0
- See Also:
-
Constructor Summary
ConstructorDescriptionHttpMessage
(URL url, String message) Prepare the sender with a given url and the message to send.HttpMessage
(URL url, String message, boolean async) Prepare the sender with a given url and the message to send. -
Method Summary
Modifier and TypeMethodDescriptionThe content type for this message once submitted.int
getUrl()
boolean
Whether this message should be sent in an asynchronous fashion.void
setContentType
(String contentType) The content type for this message once submitted.void
setResponseCode
(int responseCode) toString()
-
Constructor Details
-
HttpMessage
Prepare the sender with a given url and the message to send.- Parameters:
url
- the url to which the message will be sent.message
- the message itself.
-
HttpMessage
Prepare the sender with a given url and the message to send.- Parameters:
url
- the url to which the message will be sent.message
- the message itself.async
- whether the message should be sent asynchronously.
-
-
Method Details
-
toString
-
getUrl
-
getMessage
-
isAsynchronous
public boolean isAsynchronous()Whether this message should be sent in an asynchronous fashion. Default is true. -
getResponseCode
public int getResponseCode() -
getContentType
The content type for this message once submitted. Default isMediaType.APPLICATION_FORM_URLENCODED
. -
setResponseCode
public void setResponseCode(int responseCode) -
setContentType
The content type for this message once submitted. Default isMediaType.APPLICATION_FORM_URLENCODED
.
-