Annotation Interface RestServer.Status

Enclosing class:
RestServer

@Retention(RUNTIME) @Documented @Inherited @Target(METHOD) public static @interface RestServer.Status
HTTP status to configure for a declarative server response.

For endpoint methods that accept ServerResponse, generated code configures this status before invoking the method. The configured status has the same lifecycle as status set imperatively through ServerResponse.status(io.helidon.http.Status): it remains on the response unless later route or error handling changes it.

For methods that do not accept ServerResponse, generated code configures this status after the method returns and before the generated response is sent.

You can use _CODE constants from Status for value().

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    Status code to use.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    If this is a non-standard status, add a custom reason to it.
  • Element Details

    • value

      int value
      Status code to use.
      Returns:
      status code
    • reason

      String reason
      If this is a non-standard status, add a custom reason to it.
      Returns:
      reason to use
      Default:
      ""