Code example for HttpPost

Methods: setEntity

0
 
		final String url = URL_AAS_EUROPE;
		final HttpClient httpClient = new DefaultHttpClient();
		//      httpClient.getParams().setParameter("http.socket.timeout", new Integer(1200000)); // 2min 
 
		final HttpPost request = new HttpPost(url);
 
		// create the multipart request and add the parts to it 
		final MultipartEntity requestEntity = AASRequestComposer.create(gp, pMinutes);
 
		request.setEntity(requestEntity);
 
		final HttpResponse response = httpClient.execute(request);
		final int status = response.getStatusLine().getStatusCode();
 
		if (status != HttpStatus.SC_OK) {
			throw new IOException();
		} else { 
			{ // DEBUG 
				//	            final Reader r = new InputStreamReader(new BufferedInputStream(response.getEntity().getContent())); 
				//	            // see above