You are here

protected function Twitter::doRequest in Twitter 7.6

Same name and namespace in other branches
  1. 6.5 twitter.lib.php \Twitter::doRequest()
  2. 7.5 twitter.lib.php \Twitter::doRequest()

Actually performs a request.

This method can be easily overriden through inheritance.

Parameters

string $url: The url of the endpoint.

array $headers: Array of headers.

string $method: The HTTP method to use (normally POST or GET).

array $data: An array of parameters

Return value

stdClass response object.

1 call to Twitter::doRequest()
Twitter::request in ./twitter.lib.php
Performs a request.

File

./twitter.lib.php, line 199
Integration layer to communicate with the Twitter REST API 1.1. https://dev.twitter.com/docs/api/1.1

Class

Twitter
Primary Twitter API implementation class

Code

protected function doRequest($url, $headers, $method, $data) {
  $response = drupal_http_request($url, array(
    'headers' => $headers,
    'method' => $method,
    'data' => $data,
  ));
  return $response;
}