From b87234742450ee3251372242e3578a7ec9ee2d2b Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 27 Sep 2017 09:43:44 +0200 Subject: [PATCH] Added api.request tmp file when sending request (to debug) --- lib/api/source/sync.php | 3 ++- lib/api/source/update.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/api/source/sync.php b/lib/api/source/sync.php index 472954b..a697d43 100755 --- a/lib/api/source/sync.php +++ b/lib/api/source/sync.php @@ -113,7 +113,8 @@ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($curl); - /* (2) Save response to file */ + /* (2) Save request+response to file */ + file_put_contents(TMP_DIR.'/api.request', $postarray); file_put_contents(TMP_DIR.'/api.response', $response); /* (3) Close request */ diff --git a/lib/api/source/update.php b/lib/api/source/update.php index 1e159b6..80e4d2f 100755 --- a/lib/api/source/update.php +++ b/lib/api/source/update.php @@ -97,7 +97,8 @@ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($curl); - /* (2) Save response to file */ + /* (2) Save request+response to file */ + file_put_contents(TMP_DIR.'/api.request', $postarray); file_put_contents(TMP_DIR.'/api.response', $response); /* (3) Close request */