Annotation Interface Http.Produces

Enclosing class:
Http

@Retention(CLASS) @Target(METHOD) @Documented public static @interface Http.Produces
What media type(s) this method produces.

If the method may produce more than one type, the response headers must be crafted by hand. If it produces exactly one type, that type will be set by Helidon on response.

When used by Helidon declarative server code on an endpoint method that accepts the server response, generated routing code configures the content type before invoking the method, so it is available to output-stream response handling. For endpoint methods that do not accept the server response, generated code configures the content type after the method returns and before the generated response is sent.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Media types produced by this method.
  • Element Details

    • value

      String[] value
      Media types produced by this method.
      Returns:
      produced media types, such as application/json