diff --git a/lib/api.php b/lib/api.php
index ba6e880261d7041a332eab21b6c3e3d84732dba7..29403030233f78ed84b50e06d7c8586ac426d6bd 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -81,6 +81,12 @@ class OC_API {
 	* @param array $parameters
 	*/
 	public static function call($parameters){
+		// Prepare the request variables
+		if($_SERVER['REQUEST_METHOD'] == 'PUT'){
+			parse_str(file_get_contents("php://input"), $_PUT);
+		} else if($_SERVER['REQUEST_METHOD'] == 'DELETE'){
+			parse_str(file_get_contents("php://input"), $_DELETE);
+		}
 		$name = $parameters['_route'];
 		// Loop through registered actions
 		foreach(self::$actions[$name] as $action){