public class SyncHttpClient extends AsyncHttpClient
AsyncHttpClientDEFAULT_MAX_CONNECTIONS, DEFAULT_MAX_RETRIES, DEFAULT_RETRY_SLEEP_TIME_MILLIS, DEFAULT_SOCKET_BUFFER_SIZE, DEFAULT_SOCKET_TIMEOUT, ENCODING_GZIP, HEADER_ACCEPT_ENCODING, HEADER_CONTENT_DISPOSITION, HEADER_CONTENT_ENCODING, HEADER_CONTENT_RANGE, HEADER_CONTENT_TYPE, log, LOG_TAG| Constructor and Description |
|---|
SyncHttpClient()
Creates a new SyncHttpClient with default constructor arguments values
|
SyncHttpClient(boolean fixNoHttpResponseException,
int httpPort,
int httpsPort)
Creates new SyncHttpClient using given params
|
SyncHttpClient(int httpPort)
Creates a new SyncHttpClient.
|
SyncHttpClient(int httpPort,
int httpsPort)
Creates a new SyncHttpClient.
|
SyncHttpClient(cz.msebera.android.httpclient.conn.scheme.SchemeRegistry schemeRegistry)
Creates a new SyncHttpClient.
|
| Modifier and Type | Method and Description |
|---|---|
protected RequestHandle |
sendRequest(cz.msebera.android.httpclient.impl.client.DefaultHttpClient client,
cz.msebera.android.httpclient.protocol.HttpContext httpContext,
cz.msebera.android.httpclient.client.methods.HttpUriRequest uriRequest,
java.lang.String contentType,
ResponseHandlerInterface responseHandler,
android.content.Context context)
Puts a new request in queue as a new thread in pool to be executed
|
addHeader, allowRetryExceptionClass, blockRetryExceptionClass, cancelAllRequests, cancelRequests, cancelRequestsByTAG, clearCredentialsProvider, createConnectionManager, delete, delete, delete, delete, delete, delete, endEntityViaReflection, get, get, get, get, get, get, getConnectTimeout, getDefaultThreadPool, getHttpClient, getHttpContext, getLoggingLevel, getLogInterface, getMaxConnections, getResponseTimeout, getThreadPool, getURI, getUrlWithQueryString, head, head, head, head, head, isInputStreamGZIPCompressed, isLoggingEnabled, isUrlEncodingEnabled, newAsyncHttpRequest, patch, patch, patch, patch, patch, post, post, post, post, post, post, put, put, put, put, put, removeAllHeaders, removeHeader, setAuthenticationPreemptive, setBasicAuth, setBasicAuth, setBasicAuth, setBasicAuth, setConnectTimeout, setCookieStore, setCredentials, setEnableRedirects, setEnableRedirects, setEnableRedirects, setLoggingEnabled, setLoggingLevel, setLogInterface, setMaxConnections, setMaxRetriesAndTimeout, setProxy, setProxy, setRedirectHandler, setResponseTimeout, setSSLSocketFactory, setThreadPool, setTimeout, setURLEncodingEnabled, setUserAgent, silentCloseInputStream, silentCloseOutputStreampublic SyncHttpClient()
public SyncHttpClient(int httpPort)
httpPort - non-standard HTTP-only portpublic SyncHttpClient(int httpPort,
int httpsPort)
httpPort - non-standard HTTP-only porthttpsPort - non-standard HTTPS-only portpublic SyncHttpClient(boolean fixNoHttpResponseException,
int httpPort,
int httpsPort)
fixNoHttpResponseException - Whether to fix or not issue, by ommiting SSL verificationhttpPort - HTTP port to be used, must be greater than 0httpsPort - HTTPS port to be used, must be greater than 0public SyncHttpClient(cz.msebera.android.httpclient.conn.scheme.SchemeRegistry schemeRegistry)
schemeRegistry - SchemeRegistry to be usedprotected RequestHandle sendRequest(cz.msebera.android.httpclient.impl.client.DefaultHttpClient client, cz.msebera.android.httpclient.protocol.HttpContext httpContext, cz.msebera.android.httpclient.client.methods.HttpUriRequest uriRequest, java.lang.String contentType, ResponseHandlerInterface responseHandler, android.content.Context context)
AsyncHttpClientsendRequest in class AsyncHttpClientclient - HttpClient to be used for request, can differ in single requestshttpContext - HttpContext in which the request will be executeduriRequest - instance of HttpUriRequest, which means it must be of HttpDelete,
HttpPost, HttpGet, HttpPut, etc.contentType - MIME body type, for POST and PUT requests, may be nullresponseHandler - ResponseHandler or its subclass to put the response intocontext - Context of Android application, to hold the reference of request