All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.tno.bim.nmd.services.AuthorizedRestDataService Maven / Gradle / Ivy

The newest version!
package nl.tno.bim.nmd.services;

import java.util.Map;
import org.apache.http.client.methods.HttpGet;

/**
 * Class to handle authorization to a rest API for the NMD connectionn
 * @author vijj
 * ToDo: there are currently a lot of methods in here that should be in a lower level class. move these.
 */
public class AuthorizedRestDataService extends RestDataService  {

	private String token;	
		
	@Override
	protected HttpGet createHttpGetRequest(String path, Map params) {
		HttpGet request = new HttpGet(createUri(path, params));
		request.addHeader("Access_Token", this.token);
		return request;
	}
	
	public void setToken(String token) {
		this.token = token;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy