Interface Request


public interface Request
The Request class can be used to construct HTTP request:
   Request r = new RequestBuilder().setUrl("url")
                      .setRealm((new Realm.RealmBuilder()).setPrincipal(user)
                      .setPassword(admin)
                      .setRealmName("MyRealm")
                      .setScheme(Realm.AuthScheme.DIGEST).build());
 
  • Method Details

    • getMethod

      String getMethod()
      Return the request's method name (GET, POST, etc.)
      Returns:
      the request's method name (GET, POST, etc.)
    • getUri

      Uri getUri()
    • getUrl

      String getUrl()
    • getInetAddress

      InetAddress getInetAddress()
      Return the InetAddress to override
      Returns:
      the InetAddress
    • getLocalAddress

      InetAddress getLocalAddress()
    • getHeaders

      Return the current set of Headers.
      Returns:
      a FluentCaseInsensitiveStringsMap contains headers.
    • getCookies

      Collection<Cookie> getCookies()
      Return Coookie.
      Returns:
      an unmodifiable Collection of Cookies
    • getByteData

      byte[] getByteData()
      Return the current request's body as a byte array
      Returns:
      a byte array of the current request's body.
    • getCompositeByteData

      List<byte[]> getCompositeByteData()
      Returns:
      the current request's body as a composite of byte arrays
    • getStringData

      String getStringData()
      Return the current request's body as a string
      Returns:
      an String representation of the current request's body.
    • getStreamData

      InputStream getStreamData()
      Return the current request's body as an InputStream
      Returns:
      an InputStream representation of the current request's body.
    • getBodyGenerator

      BodyGenerator getBodyGenerator()
      Return the current request's body generator.
      Returns:
      A generator for the request body.
    • getContentLength

      long getContentLength()
      Return the current size of the content-lenght header based on the body's size.
      Returns:
      the current size of the content-lenght header based on the body's size.
    • getFormParams

      List<Param> getFormParams()
      Return the current form parameters.
      Returns:
      a List<Param> of parameters.
    • getParts

      List<Part> getParts()
      Return the current Parts
      Returns:
      the current Parts
    • getVirtualHost

      String getVirtualHost()
      Return the virtual host value.
      Returns:
      the virtual host value.
    • getQueryParams

      List<Param> getQueryParams()
      Return the query params.
      Returns:
      List<Param> of query string
    • getProxyServer

      ProxyServer getProxyServer()
      Return the ProxyServer
      Returns:
      the ProxyServer
    • getRealm

      Realm getRealm()
      Return the Realm
      Returns:
      the Realm
    • getFile

      File getFile()
      Return the File to upload.
      Returns:
      the File to upload.
    • getFollowRedirect

      Boolean getFollowRedirect()
      Return follow redirect
      Returns:
      the TRUE> to follow redirect, FALSE, if NOT to follow, whatever the client config. Return null if not set.
    • getRequestTimeout

      int getRequestTimeout()
      Overrides the config default value
      Returns:
      the request timeout
    • getRangeOffset

      long getRangeOffset()
      Return the HTTP Range header value, or
      Returns:
      the range header value, or 0 is not set.
    • getBodyEncoding

      String getBodyEncoding()
      Return the encoding value used when encoding the request's body.
      Returns:
      the encoding value used when encoding the request's body.
    • getConnectionPoolPartitioning

      ConnectionPoolPartitioning getConnectionPoolPartitioning()
    • getNameResolver

      NameResolver getNameResolver()