Class DefaultRequest

    • Method Detail

      • getUrl

        public String getUrl()
        Specified by:
        getUrl in interface Request
        Returns:
        the url (the uri's String form)
      • getMethod

        public String getMethod()
        Specified by:
        getMethod in interface Request
        Returns:
        the request's HTTP method (GET, POST, etc.)
      • getUri

        public Uri getUri()
        Specified by:
        getUri in interface Request
        Returns:
        the uri
      • getAddress

        public InetAddress getAddress()
        Specified by:
        getAddress in interface Request
        Returns:
        the InetAddress to be used to bypass uri's hostname resolution
      • getHeaders

        public io.netty.handler.codec.http.HttpHeaders getHeaders()
        Specified by:
        getHeaders in interface Request
        Returns:
        the HTTP headers
      • getCookies

        public List<io.netty.handler.codec.http.cookie.Cookie> getCookies()
        Specified by:
        getCookies in interface Request
        Returns:
        the HTTP cookies
      • getByteData

        public byte[] getByteData()
        Specified by:
        getByteData in interface Request
        Returns:
        the request's body byte array (only non null if it was set this way)
      • getCompositeByteData

        public List<byte[]> getCompositeByteData()
        Specified by:
        getCompositeByteData in interface Request
        Returns:
        the request's body array of byte arrays (only non null if it was set this way)
      • getStringData

        public String getStringData()
        Specified by:
        getStringData in interface Request
        Returns:
        the request's body string (only non null if it was set this way)
      • getByteBufferData

        public ByteBuffer getByteBufferData()
        Specified by:
        getByteBufferData in interface Request
        Returns:
        the request's body ByteBuffer (only non null if it was set this way)
      • getStreamData

        public InputStream getStreamData()
        Specified by:
        getStreamData in interface Request
        Returns:
        the request's body InputStream (only non null if it was set this way)
      • getBodyGenerator

        public BodyGenerator getBodyGenerator()
        Specified by:
        getBodyGenerator in interface Request
        Returns:
        the request's body BodyGenerator (only non null if it was set this way)
      • getVirtualHost

        public String getVirtualHost()
        Specified by:
        getVirtualHost in interface Request
        Returns:
        the virtual host to connect to
      • getProxyServer

        public ProxyServer getProxyServer()
        Specified by:
        getProxyServer in interface Request
        Returns:
        the proxy server to be used to perform this request (overrides the one defined in config)
      • getRealm

        public Realm getRealm()
        Specified by:
        getRealm in interface Request
        Returns:
        the realm to be used to perform this request (overrides the one defined in config)
      • getFile

        public File getFile()
        Specified by:
        getFile in interface Request
        Returns:
        the file to be uploaded
      • getFollowRedirect

        public Boolean getFollowRedirect()
        Specified by:
        getFollowRedirect in interface Request
        Returns:
        if this request is to follow redirects. Non null values means "override config value".
      • getRequestTimeout

        public Duration getRequestTimeout()
        Specified by:
        getRequestTimeout in interface Request
        Returns:
        the request timeout. Non zero values means "override config value".
      • getReadTimeout

        public Duration getReadTimeout()
        Specified by:
        getReadTimeout in interface Request
        Returns:
        the read timeout. Non zero values means "override config value".
      • getRangeOffset

        public long getRangeOffset()
        Specified by:
        getRangeOffset in interface Request
        Returns:
        the range header value, or 0 is not set.
      • getCharset

        public Charset getCharset()
        Specified by:
        getCharset in interface Request
        Returns:
        the charset value used when decoding the request's body.
      • getNameResolver

        public io.netty.resolver.NameResolver<InetAddress> getNameResolver()
        Specified by:
        getNameResolver in interface Request
        Returns:
        the NameResolver to be used to resolve hostnams's IP
      • getQueryParams

        public List<Param> getQueryParams()
        Specified by:
        getQueryParams in interface Request
        Returns:
        the query params resolved from the url/uri