public function request($url, $method = 'get', $requestData = array())
 {
     $requestData['profile']['name'] = $this->name;
     $response = xhttp::request($url, $method, $requestData);
     self::$datastore[$this->name]['response'] = $response;
     return $response;
 }
 public static function get_oauth_header($profile, $url, $requestData = array())
 {
     $profile = $profile instanceof xhttp_profile ? $profile->name : $profile ? $profile : 'default';
     # Abort request before executing curl
     xhttp::addHookToRequest($requestData, 'curl-initialization', array(__CLASS__, 'return_authorization_header'), 9);
     $method = isset($requestData['method']) ? $requestData['method'] : isset($requestData['post']) ? 'post' : 'get';
     $requestData['profile']['name'] = $profile;
     return xhttp::request($url, $method, $requestData);
 }