Class RespondWithDirectives

Direct Known Subclasses:
RouteDirectives

public abstract class RespondWithDirectives extends RangeDirectives
  • Constructor Details

    • RespondWithDirectives

      public RespondWithDirectives()
  • Method Details

    • respondWithDefaultHeader

      public Route respondWithDefaultHeader(HttpHeader responseHeader, Supplier<Route> inner)
      Adds the given response header to all HTTP responses of its inner Route, if the response from the inner Route doesn't already contain a header with the same name.
      Parameters:
      responseHeader - (undocumented)
      inner - (undocumented)
      Returns:
      (undocumented)
    • respondWithDefaultHeaders

      public Route respondWithDefaultHeaders(Iterable<HttpHeader> responseHeaders, Supplier<Route> inner)
      Adds the given response headers to all HTTP responses of its inner Route, if a header already exists it is not added again.
      Parameters:
      responseHeaders - (undocumented)
      inner - (undocumented)
      Returns:
      (undocumented)
    • respondWithHeader

      public Route respondWithHeader(HttpHeader responseHeader, Supplier<Route> inner)
      Unconditionally adds the given response header to all HTTP responses of its inner Route.
      Parameters:
      responseHeader - (undocumented)
      inner - (undocumented)
      Returns:
      (undocumented)
    • respondWithHeaders

      public Route respondWithHeaders(Iterable<HttpHeader> responseHeaders, Supplier<Route> inner)
      Unconditionally adds the given response headers to all HTTP responses of its inner Route.
      Parameters:
      responseHeaders - (undocumented)
      inner - (undocumented)
      Returns:
      (undocumented)