Code example for BasicHttpParams

Methods: setBooleanParameter

0
 
	private Context context;
	private HttpClient client;
 
	private HttpClient setupClient() {
		HttpParams params = new BasicHttpParams();
		HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
		HttpProtocolParams.setContentCharset(params, "UTF-8");
		params.setBooleanParameter("http.protocol.expect-continue", false);
		client = new DefaultHttpClient(params);
		return client;
	} 
	 
	private JSONObject createJSONObject(HttpResponse result)
			throws IOException, JSONException { 
		InputStream content = result.getEntity().getContent();
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				content));
		try { 
			StringBuffer buf = new StringBuffer();
Stop searching for code, let great code find you!  Add Codota to your java IDE