Code example for HttpPost

Methods: setEntity

	public void uploadMachine(Machine m, String uri) {
		try { 
			HttpClient httpclient = new DefaultHttpClient();
			HttpPost httppost = new HttpPost(uri);
			HttpResponse response = httpclient.execute(httppost);
			HttpEntity entity = response.getEntity();
			Log.d("HTTP", "HTTP: OK");
		} catch (Exception e) {
			Log.e("HTTP", "Error in http connection " + e.toString());
	 * Known issues: duplicate key errors when you run the same code twice with 
	 * the same id 
Connect your IDE to all the code out there  Get Codota for Java