Class RestServer

java.lang.Object
io.helidon.webserver.http.RestServer

public final class RestServer extends Object
APIs to define a declarative server endpoint.

Declarative response metadata, such as RestServer.Status, RestServer.Header, RestServer.ComputedHeader, and Http.Produces, is configured on ServerResponse by generated routing code. For endpoint methods that accept ServerResponse, generated code configures this metadata before invoking the method, so it is available to ServerResponse.outputStream() and other response-handling APIs. For endpoint methods that do not accept ServerResponse, generated code configures this metadata after the method returns and before the generated response is sent.

Declarative response metadata has the same lifecycle as metadata configured imperatively on ServerResponse: it remains on the current response unless later route or error handling changes it.