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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `apply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object target)` Applies the configured information to the response
    `String` | `getResultCode()`
    `int` | `getStatus()`
    `void` | `setStatus(int status)`

- - ### Method Detail

    - #### apply

          String apply(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response,
                     Object target)

      Applies the configured information to the response
      Parameters:
        `request` - The request
        `response` - The response
        `target` - 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

Copyright © 2000–2022 Apache Software Foundation. All rights reserved.