示例#1
0
 public function testDELETEJSON()
 {
     $res = HTTP::delete('http://httpbin.org/delete')->json(array('doing' => 'delete'))->send();
     $this->assertFalse($res->error());
     $this->assertEquals(200, $res->status());
     $this->assertEquals((object) array('doing' => 'delete'), $res->body()->json);
 }
示例#2
0
 public static function delete($url, $headers = array(), $auth = false)
 {
     $url = self::$config['apiURLPrefix'] . $url;
     if (self::$apiVersion) {
         $headers[] = "Zotero-API-Version: " . self::$apiVersion;
     }
     if (!$auth && self::$apiKey) {
         $headers[] = "Authorization: Bearer " . self::$apiKey;
     }
     $response = HTTP::delete($url, $headers, $auth);
     return $response;
 }
示例#3
0
 public static function delete($url, $headers = array(), $auth = false)
 {
     self::loadConfig();
     $url = self::$config['apiURLPrefix'] . $url;
     $response = HTTP::delete($url, $headers, $auth);
     return $response;
 }