Code example for HttpPost

Methods: setEntitygetParams

0
				return entity == null ? null : EntityUtils.toString(entity,
						"UTF-8"); 
			} 
		}; 
 
		HttpPost postMethod = new HttpPost(url);
 
		postMethod.getParams().setParameter(
				CoreProtocolPNames.USE_EXPECT_CONTINUE, Boolean.FALSE);
 
		if (data != null) {
			StringEntity tmp = null;
			try { 
				tmp = new StringEntity(data, "UTF-8");
			} catch (UnsupportedEncodingException e) {
				debug.logE(TAG, "sendRequest ERROR", e.getCause());
				return null; 
			} 
 
			postMethod.setEntity(tmp);
		} 
 
		String response = hc.execute(postMethod, res);
 
		SAXParserFactory spf = SAXParserFactory.newInstance();
Stop searching for code, let great code find you!  Add Codota to your java IDE