Class DefaultRequest

  • All Implemented Interfaces:
    HttpMessage, Request

    public class DefaultRequest
    extends java.lang.Object
    implements Request
    Since:
    0.5.0
    • Constructor Detail

      • DefaultRequest

        public DefaultRequest​(HttpMethod method,
                              java.lang.String href)
      • DefaultRequest

        public DefaultRequest​(HttpMethod method,
                              java.lang.String href,
                              QueryString query)
      • DefaultRequest

        public DefaultRequest​(HttpMethod method,
                              java.lang.String href,
                              QueryString query,
                              HttpHeaders headers,
                              java.io.InputStream body,
                              long contentLength)
    • Method Detail

      • getResourceUrl

        public java.net.URI getResourceUrl()
        Description copied from interface: Request
        Returns the request target resource's Uniform Resource Locator location without a query string. Query string parameters are maintained separately via the queryString property.

        This URI can be thought of the request fully qualified URL before any question mark indicating query parameters, e.g. the parts in bold only:

        https://some.host.com/some/resource/path/here?some=param&another=param.

        Any potential question mark itself and anything after it are not included.

        Specified by:
        getResourceUrl in interface Request
        Returns:
        the request target resource's Uniform Resource Locator location without a query string.
      • getBody

        public java.io.InputStream getBody()
        Specified by:
        getBody in interface HttpMessage