Code example for BasicNameValuePair

0
	    try { 
	        // Add your data 
	        List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(4);
	        nameValuePairs.add(new BasicNameValuePair("user", user));
	        nameValuePairs.add(new BasicNameValuePair("sender", sender));
	        nameValuePairs.add(new BasicNameValuePair("phone", phone));
	        nameValuePairs.add(new BasicNameValuePair("sms", sms));
	        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs, HTTP.UTF_8));
 
	        // Execute HTTP Post Request 
	        httpclient.execute(httppost);
	         
	    } catch (ClientProtocolException e) {
	        // TODO Auto-generated catch block 
	    } catch (IOException e) {
	        // TODO Auto-generated catch block 
	    } 
	}  
 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE