Code example for HttpRequestBase

Methods: setHeader

0
			} 
		} 
	} 
 
	private void setupDefaultHeaders(HttpRequestBase request, String token) {
		HTTPUtils.setupDefaultHeaders(request);
		request.setHeader("Accept", "application/json");
		if (token != null) {
			request.addHeader("Authorization", "Bearer " + token);
		} 
	} 
 
	public void downloadApp(Uri uri, String token)
			throws ClientProtocolException, IOException, JSONException { 
		String guid = getAppGuid(uri);
		if (guid == null) {
			// We do no have guid for this element - its mean that is not 
			// yet synced to server - this mean that we can not download it 
			return; 
		} 
		String url = new GetBuilder(BASE_API_URL)