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 String |
DEFAULT_CHARSET |
| Constructor and Description |
|---|
AsyncHttpProviderUtils() |
public static final String 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, String 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 MultipartRequestEntity createMultipartRequestEntity(List<Part> params, FluentCaseInsensitiveStringsMap requestHeaders) throws FileNotFoundException
params - requestHeaders - FileNotFoundExceptionpublic static final byte[] readFully(InputStream in, int[] lengthWrapper) throws IOException
IOExceptionpublic static String constructUserAgent(Class<? extends AsyncHttpProvider> httpProvider)
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.