Code example for HttpPost

Methods: setEntity

0
	} 
 
	/* helper to enclose all the http-related code */ 
	private HttpResponse postEntity(MultipartEntity entity) {
		HttpClient httpclient = new DefaultHttpClient();
		HttpPost httppost = new HttpPost("http://www.tumblr.com/api/write");
		try { 
			httppost.setEntity(entity);
			HttpResponse response = httpclient.execute(httppost);
			return response;
		} catch (ClientProtocolException e) {
			Log.e(TAG, "client proto exception!", e);
		} catch (IOException e) {
			Log.e(TAG, "io exception", e);
		} 
		return null; 
	} 
 
	public boolean postText(String title, String body, Bundle options) {
		MultipartEntity entity = getEntityWithOptions(options);
		try {