public class AsyncHttpProviderUtils extends Object
AsyncHttpProvider common utilities.
The cookies's handling code is from the Netty framework.| Modifier and Type | Field and Description |
|---|---|
static Charset |
DEFAULT_CHARSET |
| Constructor and Description |
|---|
AsyncHttpProviderUtils() |
public static final Charset DEFAULT_CHARSET
public static final void validateSupportedScheme(UriComponents uri)
public static final String getBaseUrl(UriComponents uri)
public static final String getAuthority(UriComponents uri)
public static final String contentToString(List<HttpResponseBodyPart> bodyParts, Charset charset) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static final byte[] contentToByte(List<HttpResponseBodyPart> bodyParts) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static final InputStream contentToInputStream(List<HttpResponseBodyPart> bodyParts) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static final int getDefaultPort(UriComponents uri)
public static final String getNonEmptyPath(UriComponents uri)
public static final byte[] readFully(InputStream in, int[] lengthWrapper) throws IOException
IOExceptionpublic static String constructUserAgent(Class<? extends AsyncHttpProvider> httpProvider, AsyncHttpClientConfig config)
public static String keepAliveHeaderValue(AsyncHttpClientConfig config)
public static int requestTimeout(AsyncHttpClientConfig config, Request request)
public static boolean followRedirect(AsyncHttpClientConfig config, Request request)
Copyright © 2014. All Rights Reserved.