Package org.apache.struts2.rest
Class DefaultHttpHeaders
java.lang.Object
org.apache.struts2.rest.DefaultHttpHeaders
- All Implemented Interfaces:
- HttpHeaders
Default implementation of rest info that uses fluent-style construction
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionapply(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object target) Applies the configured information to the responseintlastModified(Date date) renderResult(String code) setLocation(String loc) setLocationId(Object id) voidsetStatus(int s) withStatus(int code) 
- 
Constructor Details- 
DefaultHttpHeaderspublic DefaultHttpHeaders()
- 
DefaultHttpHeaders
 
- 
- 
Method Details- 
renderResult
- 
withStatus
- 
withETag
- 
withNoETag
- 
setLocationId
- 
setLocation
- 
lastModified
- 
disableCaching
- 
applypublic String apply(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object target) Description copied from interface:HttpHeadersApplies the configured information to the response- Specified by:
- applyin interface- HttpHeaders
- Parameters:
- request- The request
- response- The response
- target- The target object, usually the action
- Returns:
- The result code to process
 
- 
getStatuspublic int getStatus()- Specified by:
- getStatusin interface- HttpHeaders
- Returns:
- The HTTP status code
 
- 
setStatuspublic void setStatus(int s) - Specified by:
- setStatusin interface- HttpHeaders
- Parameters:
- s- set the HTTP status code
 
- 
getResultCode- Specified by:
- getResultCodein interface- HttpHeaders
- Returns:
- The result code to process
 
 
-