示例#1
0
 /**
  * performs a HTTP request
  *
  * This method overrides the request with JSON content type
  *
  * @param string $url the URL to target
  * @param string $method the HTTP method to use
  * @param array $headers key/value pairs for headers to include
  * @param string $body the body of the request (for PUT and POST)
  * @return \OpenCloud\HttpResponse
  */
 public function request($url, $method = 'GET', array $headers = array(), $body = null)
 {
     $headers['Accept'] = RAXSDK_CONTENT_TYPE_JSON;
     $headers['Content-Type'] = RAXSDK_CONTENT_TYPE_JSON;
     return parent::request($url, $method, $headers, $body);
 }