From 067f4224cd8513cd9597c5c4f215802050bc03e1 Mon Sep 17 00:00:00 2001 From: cleeve Date: Mon, 18 Nov 2019 09:50:14 +0000 Subject: [PATCH] Update RequestsConnection.php (#1) Fix for post requests --- src/Connections/RequestsConnection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Connections/RequestsConnection.php b/src/Connections/RequestsConnection.php index 803a4a2..6c1863c 100644 --- a/src/Connections/RequestsConnection.php +++ b/src/Connections/RequestsConnection.php @@ -35,7 +35,7 @@ public function load(IApiRequest $request) { $headers = $this->_buildHeaders($req); $data = $this->_buildData($req); - if(empty(array_filter($data))) + if(!$data || (is_array($data) && empty(array_filter($data)))) { // Prevent 411 errors from some servers $headers['Content-Length'] = 0;