
nl.tno.bim.nmd.services.AuthorizedRestDataService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bimnmdservice Show documentation
Show all versions of bimnmdservice Show documentation
provides a REST api for retrieving nmd data from various data sources
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