diff options
Diffstat (limited to 'src/PurpleCode/PCurl/PJsonCurl.php')
-rw-r--r-- | src/PurpleCode/PCurl/PJsonCurl.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/PurpleCode/PCurl/PJsonCurl.php b/src/PurpleCode/PCurl/PJsonCurl.php new file mode 100644 index 0000000..e8d813c --- /dev/null +++ b/src/PurpleCode/PCurl/PJsonCurl.php @@ -0,0 +1,20 @@ +<?php
+
+/**
+ * PCurl is a REST client libary for PHP.
+ *
+ * See http://github.com/purplecode/php.curl for details.
+ *
+ * This code is licensed for use, modification, and distribution
+ * under the terms of the MIT License (see http://en.wikipedia.org/wiki/MIT_License)
+ */
+
+namespace PurpleCode\PCurl;
+
+class PJsonCurl extends PCurl {
+
+ public function call($method, $url, $payload = '') {
+ return json_decode(parent::call($method, $url, json_encode($payload)));
+ }
+
+}
|