From 7c95e563a182788a35a828c046cb8fc162992d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Caselles?= Date: Fri, 24 Jul 2020 08:29:08 +0200 Subject: [PATCH] Update InstasentClient.php Fix API with redirect 301. --- src/Instasent/Abstracts/InstasentClient.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Instasent/Abstracts/InstasentClient.php b/src/Instasent/Abstracts/InstasentClient.php index 572fe96..5311616 100644 --- a/src/Instasent/Abstracts/InstasentClient.php +++ b/src/Instasent/Abstracts/InstasentClient.php @@ -58,6 +58,7 @@ protected function execRequest($url, $httpMethod, $data) curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); if ($httpMethod == 'POST') {