From 02923b7af91b070205f1a20a8f6b75709ffb19e0 Mon Sep 17 00:00:00 2001
From: Philipp Dittert
Date: Tue, 30 Sep 2014 19:57:08 +0200
Subject: [PATCH] implementing "delete" request
---
src/Puzzle/Client.php | 16 ++++++++++++++++
src/Puzzle/Interfaces/SerializerInterface.php | 4 +---
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/Puzzle/Client.php b/src/Puzzle/Client.php
index 62cb86a..ac1a3a4 100644
--- a/src/Puzzle/Client.php
+++ b/src/Puzzle/Client.php
@@ -292,6 +292,22 @@ protected function getRequest($method, $uri, $params, $body)
return $this->execute($method, $uri, $params, $body);
}
+ /**
+ * delete request implementation
+ *
+ * @param string $method the request method
+ * @param string $uri the uri
+ * @param string $params optional query string parameters
+ * @param string $body body/post parameters
+ *
+ * @return string
+ * @throws \Puzzle\Exceptions\InvalidRequestException
+ */
+ protected function deleteRequest($method, $uri, $params, $body)
+ {
+ return $this->execute($method, $uri, $params, $body);
+ }
+
/**
* head request implementation
*
diff --git a/src/Puzzle/Interfaces/SerializerInterface.php b/src/Puzzle/Interfaces/SerializerInterface.php
index 18fab52..7ecb772 100644
--- a/src/Puzzle/Interfaces/SerializerInterface.php
+++ b/src/Puzzle/Interfaces/SerializerInterface.php
@@ -32,7 +32,7 @@
* @link http://www.appserver.io
*/
-Interface SerializerInterface
+interface SerializerInterface
{
/**
* Serialize assoc array into JSON string
@@ -47,10 +47,8 @@ public function serialize($data);
* Deserialize JSON into an assoc array
*
* @param string $data JSON encoded string
- * @param array $headers Response Headers
*
* @return array
*/
public function deserialize($data);
-
}