* Example usage: HttpUtil.get(url, getAuthorizationHeaders());
* @return
* @throws Exception
*/
private Map<String, String> getAuthorizationHeaders () throws Exception {
Authorization auth = getAuthorization();
String access_token = (auth != null) ? auth.getAccessToken() : null;
if (access_token == null) {
throw new Exception("No authorization token available");
}
String token_type = (auth != null) ? auth.getTokenType() : null;
if (token_type == null) {
throw new Exception("No token type available");
}
Map<String, String> headers = new HashMap<String, String>();