Package org.asynchttpclient
Class DefaultRequest
- java.lang.Object
-
- org.asynchttpclient.DefaultRequest
-
-
Field Summary
Fields Modifier and Type Field Description ProxyServerproxyServer
-
Constructor Summary
Constructors Constructor Description DefaultRequest(String method, Uri uri, InetAddress address, InetAddress localAddress, io.netty.handler.codec.http.HttpHeaders headers, List<io.netty.handler.codec.http.cookie.Cookie> cookies, byte[] byteData, List<byte[]> compositeByteData, String stringData, ByteBuffer byteBufferData, InputStream streamData, BodyGenerator bodyGenerator, List<Param> formParams, List<Part> bodyParts, String virtualHost, ProxyServer proxyServer, Realm realm, File file, Boolean followRedirect, int requestTimeout, int readTimeout, long rangeOffset, Charset charset, ChannelPoolPartitioning channelPoolPartitioning, io.netty.resolver.NameResolver<InetAddress> nameResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InetAddressgetAddress()BodyGeneratorgetBodyGenerator()List<Part>getBodyParts()ByteBuffergetByteBufferData()byte[]getByteData()ChannelPoolPartitioninggetChannelPoolPartitioning()CharsetgetCharset()List<byte[]>getCompositeByteData()List<io.netty.handler.codec.http.cookie.Cookie>getCookies()FilegetFile()BooleangetFollowRedirect()List<Param>getFormParams()io.netty.handler.codec.http.HttpHeadersgetHeaders()InetAddressgetLocalAddress()StringgetMethod()io.netty.resolver.NameResolver<InetAddress>getNameResolver()ProxyServergetProxyServer()List<Param>getQueryParams()longgetRangeOffset()intgetReadTimeout()RealmgetRealm()intgetRequestTimeout()InputStreamgetStreamData()StringgetStringData()UrigetUri()StringgetUrl()StringgetVirtualHost()StringtoString()
-
-
-
Field Detail
-
proxyServer
public final ProxyServer proxyServer
-
-
Constructor Detail
-
DefaultRequest
public DefaultRequest(String method, Uri uri, InetAddress address, InetAddress localAddress, io.netty.handler.codec.http.HttpHeaders headers, List<io.netty.handler.codec.http.cookie.Cookie> cookies, byte[] byteData, List<byte[]> compositeByteData, String stringData, ByteBuffer byteBufferData, InputStream streamData, BodyGenerator bodyGenerator, List<Param> formParams, List<Part> bodyParts, String virtualHost, ProxyServer proxyServer, Realm realm, File file, Boolean followRedirect, int requestTimeout, int readTimeout, long rangeOffset, Charset charset, ChannelPoolPartitioning channelPoolPartitioning, io.netty.resolver.NameResolver<InetAddress> nameResolver)
-
-
Method Detail
-
getUrl
public String getUrl()
-
getMethod
public String getMethod()
-
getAddress
public InetAddress getAddress()
- Specified by:
getAddressin interfaceRequest- Returns:
- the InetAddress to be used to bypass uri's hostname resolution
-
getLocalAddress
public InetAddress getLocalAddress()
- Specified by:
getLocalAddressin interfaceRequest- Returns:
- the local address to bind from
-
getHeaders
public io.netty.handler.codec.http.HttpHeaders getHeaders()
- Specified by:
getHeadersin interfaceRequest- Returns:
- the HTTP headers
-
getCookies
public List<io.netty.handler.codec.http.cookie.Cookie> getCookies()
- Specified by:
getCookiesin interfaceRequest- Returns:
- the HTTP cookies
-
getByteData
public byte[] getByteData()
- Specified by:
getByteDatain interfaceRequest- Returns:
- the request's body byte array (only non null if it was set this way)
-
getCompositeByteData
public List<byte[]> getCompositeByteData()
- Specified by:
getCompositeByteDatain interfaceRequest- Returns:
- the request's body array of byte arrays (only non null if it was set this way)
-
getStringData
public String getStringData()
- Specified by:
getStringDatain interfaceRequest- Returns:
- the request's body string (only non null if it was set this way)
-
getByteBufferData
public ByteBuffer getByteBufferData()
- Specified by:
getByteBufferDatain interfaceRequest- Returns:
- the request's body ByteBuffer (only non null if it was set this way)
-
getStreamData
public InputStream getStreamData()
- Specified by:
getStreamDatain interfaceRequest- Returns:
- the request's body InputStream (only non null if it was set this way)
-
getBodyGenerator
public BodyGenerator getBodyGenerator()
- Specified by:
getBodyGeneratorin interfaceRequest- Returns:
- the request's body BodyGenerator (only non null if it was set this way)
-
getFormParams
public List<Param> getFormParams()
- Specified by:
getFormParamsin interfaceRequest- Returns:
- the request's form parameters
-
getBodyParts
public List<Part> getBodyParts()
- Specified by:
getBodyPartsin interfaceRequest- Returns:
- the multipart parts
-
getVirtualHost
public String getVirtualHost()
- Specified by:
getVirtualHostin interfaceRequest- Returns:
- the virtual host to connect to
-
getProxyServer
public ProxyServer getProxyServer()
- Specified by:
getProxyServerin interfaceRequest- Returns:
- the proxy server to be used to perform this request (overrides the one defined in config)
-
getRealm
public Realm getRealm()
-
getFile
public File getFile()
-
getFollowRedirect
public Boolean getFollowRedirect()
- Specified by:
getFollowRedirectin interfaceRequest- Returns:
- if this request is to follow redirects. Non null values means "override config value".
-
getRequestTimeout
public int getRequestTimeout()
- Specified by:
getRequestTimeoutin interfaceRequest- Returns:
- the request timeout. Non zero values means "override config value".
-
getReadTimeout
public int getReadTimeout()
- Specified by:
getReadTimeoutin interfaceRequest- Returns:
- the read timeout. Non zero values means "override config value".
-
getRangeOffset
public long getRangeOffset()
- Specified by:
getRangeOffsetin interfaceRequest- Returns:
- the range header value, or 0 is not set.
-
getCharset
public Charset getCharset()
- Specified by:
getCharsetin interfaceRequest- Returns:
- the charset value used when decoding the request's body.
-
getChannelPoolPartitioning
public ChannelPoolPartitioning getChannelPoolPartitioning()
- Specified by:
getChannelPoolPartitioningin interfaceRequest- Returns:
- the strategy to compute ChannelPool's keys
-
getNameResolver
public io.netty.resolver.NameResolver<InetAddress> getNameResolver()
- Specified by:
getNameResolverin interfaceRequest- Returns:
- the NameResolver to be used to resolve hostnams's IP
-
getQueryParams
public List<Param> getQueryParams()
- Specified by:
getQueryParamsin interfaceRequest- Returns:
- the query params resolved from the url/uri
-
-