Code example for HttpGet

Methods: setHeader

0
		//TODO: https 
		String urlString = baseURL.replaceFirst("s", "") + "/openid/iphone_config";
		 
		String tag = "getConfiguredProviders";
		 
		HttpGet httpget = new HttpGet(urlString);
		httpget.setHeader("Accept", "application/json");
		httpget.setHeader("Content-type", "application/json");
		 
		JRConnectionManager.getInstance().createConnectionFromRequest(httpget, this, tag);
		// Error handles in connectionDidFailWithError 
	} 
	 
	private void finishGetConfiguredProviders(String dataStr) {
		 
		JSONObject jObject = null;
		JSONTokener tokener = new JSONTokener(dataStr);
		try { 
			jObject = new JSONObject(tokener);
			JSONArray jEnabledProviders = jObject.getJSONArray("enabled_providers");
			JSONObject jProviderInfo = jObject.getJSONObject("provider_info");