Code example for DefaultHttpClient

Methods: executegetConnectionManager

0
    protected void registerClick() { 
        if (mClickthroughUrl == null) return;
 
        new Thread(new Runnable() {
            public void run () { 
                DefaultHttpClient httpclient = new DefaultHttpClient();
                HttpGet httpget = new HttpGet(mClickthroughUrl);
                httpget.addHeader("User-Agent", mUserAgent);
                try { 
                    httpclient.execute(httpget);
                } catch (ClientProtocolException e) {
                    Log.i("MoPub", "Click tracking failed: "+mClickthroughUrl);
                } catch (IOException e) {
                    Log.i("MoPub", "Click tracking failed: "+mClickthroughUrl);
                } finally { 
                    httpclient.getConnectionManager().shutdown();
                } 
            } 
        }).start();
    } 
 
Connect your IDE to all the code out there  Get Codota for Java