Allows control over the page response (headers, content type, status)
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
contentType(java.lang.String contentType)Set the response content type |
|
void |
encoding(java.lang.String encoding)Sets the response encoding |
|
void |
header(java.lang.String name, java.lang.String value)Set a response header |
|
void |
header(java.util.Map<java.lang.String, java.lang.String> nameAndValue)Set a single named value header |
|
void |
headers(java.util.Map<java.lang.String, java.lang.String> namesAndValues)Set multiple headers |
|
void |
status(int status)Sets the response status |
|
void |
status(int status, java.lang.String message)Sets the response status |
|
void |
status(org.springframework.http.HttpStatus status)Sets the response status |
|
void |
status(org.springframework.http.HttpStatus status, java.lang.String message)Sets the response status |
Set the response content type
Sets the response encoding
Set a response header
name - The name of the headervalue - The value of the headerSet a single named value header
nameAndValue - The name and value. Example header(foo:"bar")Set multiple headers
namesAndValues - The names and valuesSets the response status
status - The statusSets the response status
status - The statusSets the response status
status - The statusSets the response status
status - The status