Code example for HttpPost

Methods: setEntity

0
 
		@Override 
		protected Void doInBackground(Void... params) {
 
			HttpClient httpclient = new DefaultHttpClient();
			HttpPost httppost = new HttpPost("http://blip.tv/file/post");
 
			ProgressMultipartEntity multipartentity = new ProgressMultipartEntity(
					this);
 
			try { 
				multipartentity.addPart("file", new FileBody(videoFile));
 
				multipartentity.addPart("userlogin", new StringBody(username));
				multipartentity.addPart("password", new StringBody(password));
				multipartentity.addPart("title", new StringBody(title));
				multipartentity.addPart("post", new StringBody("1"));
				multipartentity.addPart("skin", new StringBody("api"));
 
				httppost.setEntity(multipartentity);
				HttpResponse httpresponse = httpclient.execute(httppost);
 
				HttpEntity responseentity = httpresponse.getEntity();
				if (responseentity != null) {
 
					InputStream inputstream = responseentity.getContent();