Class RespondWithDirectives

    • Constructor Detail

      • RespondWithDirectives

        public RespondWithDirectives()
    • Method Detail

      • respondWithDefaultHeader

        public Route respondWithDefaultHeader​(HttpHeader responseHeader,
                                              java.util.function.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​(java.lang.Iterable<HttpHeader> responseHeaders,
                                               java.util.function.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,
                                       java.util.function.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​(java.lang.Iterable<HttpHeader> responseHeaders,
                                        java.util.function.Supplier<Route> inner)
        Unconditionally adds the given response headers to all HTTP responses of its inner Route.
        Parameters:
        responseHeaders - (undocumented)
        inner - (undocumented)
        Returns:
        (undocumented)