Class HttpMessage

java.lang.Object
org.apereo.cas.util.http.HttpMessage
All Implemented Interfaces:
Serializable

public class HttpMessage extends Object implements Serializable
This is HttpMessage.
Since:
5.0.0
See Also:
  • Constructor Details

    • HttpMessage

      public HttpMessage(URL url, String message)
      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

      public HttpMessage(URL url, String message, boolean async)
      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

      public String toString()
      Overrides:
      toString in class Object
    • getUrl

      public URL getUrl()
    • getMessage

      public String getMessage()
    • isAsynchronous

      public boolean isAsynchronous()
      Whether this message should be sent in an asynchronous fashion. Default is true.
    • getResponseCode

      public int getResponseCode()
    • getContentType

      public String getContentType()
      The content type for this message once submitted. Default is MediaType.APPLICATION_FORM_URLENCODED.
    • setResponseCode

      public void setResponseCode(int responseCode)
    • setContentType

      public void setContentType(String contentType)
      The content type for this message once submitted. Default is MediaType.APPLICATION_FORM_URLENCODED.