You are here

private function dropbox::_response_request in Dropbox Client 7

Same name and namespace in other branches
  1. 7.4 dropbox.php \dropbox::_response_request()
  2. 7.2 dropbox.php \dropbox::_response_request()
  3. 7.3 dropbox.php \dropbox::_response_request()
10 calls to dropbox::_response_request()
dropbox::account in ./dropbox.php
Retrieve information about the authenticated users account.
dropbox::copy in ./dropbox.php
Copies a file or folder in dropbox to another location within dropbox.
dropbox::create_folder in ./dropbox.php
Create a folder relative to the user's Dropbox root or the user's application sandbox folder.
dropbox::delete in ./dropbox.php
Delete a folder or file relative to the user's Dropbox root or the user's application sandbox folder.
dropbox::media in ./dropbox.php
Retrieve a link directly to a file.

... See full list

File

./dropbox.php, line 409

Class

dropbox

Code

private function _response_request($uri) {

  #$uri =  ('/'.self::API_VERSION.$uri);
  $uri = preg_replace("#(^|[^:])//+#", "\\1/", '/' . self::API_VERSION . $uri);
  $request = "GET {$uri} HTTP/" . self::HTTP_1 . self::LINE_END;
  $url = self::SCHEME . '://' . self::HOST . $uri;
  $header = $this
    ->_build_header($url, 'GET', $request, self::LINE_END);
  if (self::DEBUG) {
    error_log($header);
  }
  $response = $this
    ->_connect($url, $header, 'GET');
  return json_decode($response);
}