Class HttpSupport.HttpBuilder

java.lang.Object
org.javalite.activeweb.HttpSupport.HttpBuilder
Direct Known Subclasses:
HttpSupport.RenderBuilder
Enclosing class:
HttpSupport

public class HttpSupport.HttpBuilder extends Object
  • Method Details

    • getControllerResponse

      protected org.javalite.activeweb.ControllerResponse getControllerResponse()
    • contentType

      public HttpSupport.HttpBuilder contentType(String contentType)
      Sets content type of response. These can be "text/html". Value "text/html" is set by default.
      Parameters:
      contentType - content type value.
      Returns:
      instance of RenderBuilder
    • header

      public HttpSupport.HttpBuilder header(String name, String value)
      Sets a HTTP header on response.
      Parameters:
      name - name of header.
      value - value of header.
      Returns:
      instance of RenderBuilder
    • status

      public void status(int status)
      Overrides HTTP status with a different value. For values and more information, look here: HTTP Status Codes. By default, the status is set to 200, OK.
      Parameters:
      status - HTTP status code.
    • statusCode

      public void statusCode(int status)
      Alias to status(int).
      Parameters:
      status - response code.