Class Request


  • public final class Request
    extends Object
    An HTTP request. Instances of this class are immutable if their body is null or itself immutable.
    • Method Detail

      • httpUrl

        public HttpUrl httpUrl()
      • url

        public URL url()
      • urlString

        public String urlString()
      • method

        public String method()
      • headers

        public Headers headers()
      • cacheControl

        public CacheControl cacheControl()
        Returns the cache control directives for this response. This is never null, even if this response contains no Cache-Control header.
      • isHttps

        public boolean isHttps()
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.