Class HttpRequest

  • public class HttpRequest
    extends java.lang.Object
    • Constructor Summary

      Constructor Description
      HttpRequest​(HttpMethod method, java.lang.String uri)  
    • Constructor Detail

      • HttpRequest

        public HttpRequest​(HttpMethod method,
                           java.lang.String uri)
    • Method Detail

      • getUri

        public java.lang.String getUri()
      • getQueryParameter

        public java.lang.String getQueryParameter​(java.lang.String name)
        Get a query parameter. The implementation will take care of decoding from the percent encoding.
      • addQueryParameter

        public HttpRequest addQueryParameter​(java.lang.String name,
                                             java.lang.String value)
        Set a query parameter, adding to existing values if present. The implementation will ensure that the name and value are properly encoded.
      • getQueryParameterNames

        public java.lang.Iterable<java.lang.String> getQueryParameterNames()
      • getQueryParameters

        public java.lang.Iterable<java.lang.String> getQueryParameters​(java.lang.String name)
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String key)
        Retrieves a user-defined attribute of this message. Attributes are stored as simple key-value pairs and are not included in a message's serialized form.
        key - attribute name
        attribute object
      • setAttribute

        public M setAttribute​(java.lang.String key,
                              java.lang.Object value)
      • removeAttribute

        public M removeAttribute​(java.lang.String key)
      • getAttributeNames

        public java.lang.Iterable<java.lang.String> getAttributeNames()
      • getHeaderNames

        public java.lang.Iterable<java.lang.String> getHeaderNames()
      • getHeaders

        public java.lang.Iterable<java.lang.String> getHeaders​(java.lang.String name)
      • getHeader

        public java.lang.String getHeader​(java.lang.String name)
      • setHeader

        public M setHeader​(java.lang.String name,
                           java.lang.String value)
      • addHeader

        public M addHeader​(java.lang.String name,
                           java.lang.String value)
      • removeHeader

        public M removeHeader​(java.lang.String name)
      • getContentEncoding

        public java.nio.charset.Charset getContentEncoding()
      • setContent

        public M setContent​(java.util.function.Supplier<> supplier)
      • getContent

        public java.util.function.Supplier<> getContent()