Code example for UrlEncodedFormEntity

0
 
	private HttpUriRequest createPostUriRequest(URL url) {
		HttpPost httppost = new HttpPost(url.toString());
        // Add your data 
        try { 
			httppost.setEntity(new UrlEncodedFormEntity(parameters));
			return httppost;
		} catch (UnsupportedEncodingException e) {
		} 
		return null; 
	} 
 
	private HttpUriRequest createGetUriRequest(URL url) {
		HttpGet httpGet = new HttpGet(url.toString());
		return httpGet;
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE