Package org.javalite.activeweb
Class HttpSupport.HttpBuilder
java.lang.Object
org.javalite.activeweb.HttpSupport.HttpBuilder
- Direct Known Subclasses:
HttpSupport.RenderBuilder
- Enclosing class:
- HttpSupport
-
Method Summary
Modifier and TypeMethodDescriptioncontentType(String contentType)
Sets content type of response.protected org.javalite.activeweb.ControllerResponse
Sets a HTTP header on response.void
status(int status)
Overrides HTTP status with a different value.void
statusCode(int status)
Alias tostatus(int)
.
-
Method Details
-
getControllerResponse
protected org.javalite.activeweb.ControllerResponse getControllerResponse() -
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
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 tostatus(int)
.- Parameters:
status
- response code.
-