Code example for UrlEncodedFormEntity

0
		// add post variables   
		List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);  
		nameValuePairs.add(new BasicNameValuePair("latitude", String.valueOf(latitude)));  
		nameValuePairs.add(new BasicNameValuePair("longitude", String.valueOf(longitude)));  
		nameValuePairs.add(new BasicNameValuePair("essid", ssid));
		post.setEntity(new UrlEncodedFormEntity(nameValuePairs));
		 
		HttpResponse response = client.execute(post);			
		if (response != null & response.getStatusLine().getStatusCode() == 200)
		{  
			//Log.e("", EntityUtils.toString(response.getEntity()));			 
			 
			// release resources 
			response.getEntity().consumeContent();
			 
			return true; 
		} 
		 
		return false; 
	}