Code example for HttpParams

Methods: setParameter

0
        SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
 
        // Set up default request parameters/headers 
        mDefaultRequestParams = new BasicHttpParams();
        mDefaultRequestParams.setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1);
        mDefaultRequestParams.setParameter(CoreProtocolPNames.HTTP_CONTENT_CHARSET, "UTF-8");
 
        HttpConnectionParams.setConnectionTimeout(mDefaultRequestParams, CONNECTION_TIMEOUT_MS);
        HttpConnectionParams.setSoTimeout(mDefaultRequestParams, SOCKET_TIMEOUT_MS);
 
        // Initialize shared components 
        mConnectionManager = new ThreadSafeClientConnManager(mDefaultRequestParams, schemeRegistry);
 
        //setting up the executor framework 
        executor = new ScheduledThreadPoolExecutor(8);
 
        //starting the callback thread - all callbacks will be posted from this thread 
        executor.submit(new Runnable() {
			@Override 
			public void run() {