Code example for DefaultHttpClient

Methods: execute

0
			ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
 
			nameValuePairs.add(new BasicNameValuePair("picture",base));
			try{ 
 
				HttpClient httpclient = new DefaultHttpClient();
				String http = "http://";
				String controlIP = ((FrameworkAndroidApp) this.getApplication()).getcontrolIP();
				String path = ((FrameworkAndroidApp) this.getApplication()).getpath();
				String url = "/pictureupload.php";
				String uri = http.concat(controlIP);
				String postto1 = uri.concat(path);
				String postto = postto1.concat(url);
				HttpPost httppost = new HttpPost(postto);
				httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
				httpclient.execute(httppost);
				//HttpEntity entity = response.getEntity(); 
				//InputStream input = entity.getContent(); 
				}catch(Exception e){
 
				e.printStackTrace();
Stop searching for code, let great code find you!  Add Codota to your java IDE