接口 ServerRequest.Headers

    • 方法详细资料

      • accept

        List<MediaTypeaccept()
        Get the list of acceptable media types, as specified by the Accept header.

        Returns an empty list if the acceptable media types are unspecified.

      • acceptCharset

        List<CharsetacceptCharset()
        Get the list of acceptable charsets, as specified by the Accept-Charset header.
      • host

        @Nullable
        InetSocketAddress host()
        Get the value of the Host header, if available.

        If the header value does not contain a port, the port in the returned address will be 0.

      • range

        List<HttpRangerange()
        Get the value of the Range header.

        Returns an empty list when the range is unknown.

      • header

        List<Stringheader​(String headerName)
        Get the header value(s), if any, for the header of the given name.

        Returns an empty list if no header values are found.

        参数:
        headerName - the header name
      • firstHeader

        @Nullable
        default String firstHeader​(String headerName)
        Get the first header value, if any, for the header for the given name.

        Returns null if no header values are found.

        参数:
        headerName - the header name
        从以下版本开始:
        5.2.5