Package org.apache.struts2.rest
Interface HttpHeaders
- All Known Implementing Classes:
DefaultHttpHeaders
public interface HttpHeaders
Type-safe rest-related information to apply to a response
-
Method Summary
-
Method Details
-
apply
String apply(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object target) Applies the configured information to the response- Parameters:
request
- The requestresponse
- The responsetarget
- The target object, usually the action- Returns:
- The result code to process
-
getStatus
int getStatus()- Returns:
- The HTTP status code
-
setStatus
void setStatus(int status) - Parameters:
status
- set the HTTP status code
-
getResultCode
String getResultCode()- Returns:
- The result code to process
-