Code example for HttpUriRequest

Methods: addHeadergetURI

	 * Adds the Authorization header to a request 
	 * @param request	The request to modify 
	 * @throws InvalidKeyException 
	private void addAuthorizationHeader(HttpUriRequest request) throws InvalidKeyException {
		String token = generateAuthToken(request.getURI().toString());
		request.addHeader(AUTHORIZATION_HEADER, token);
	 * Generates an AuthToken 
	 * @param url	The target URL 
	 * @return	An AuthToken 
	 * @throws InvalidKeyException 
	private String generateAuthToken(String url) throws InvalidKeyException {
		String keyName = mConnectionData.get(SHARED_ACCESS_KEY_NAME);
		String key = mConnectionData.get(SHARED_ACCESS_KEY);
Stop searching for code, let great code find you!  Add Codota to your java IDE