From 1cdfc3c204827b2d5ab1f4ee01dbae50bc78f831 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Tue, 19 Jul 2016 15:00:29 +0200 Subject: [PATCH] Added header --- src/Mailgun/Connection/RestClient.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Mailgun/Connection/RestClient.php b/src/Mailgun/Connection/RestClient.php index a89884f..d0f851a 100644 --- a/src/Mailgun/Connection/RestClient.php +++ b/src/Mailgun/Connection/RestClient.php @@ -83,6 +83,7 @@ class RestClient $headers['Content-Type'] = 'multipart/form-data; boundary='.$body->getBoundary(); } elseif (is_array($body)) { $body = http_build_query($body); + $headers['Content-Type'] = 'application/x-www-form-urlencoded'; } $request = new Request($method, $this->getApiUrl($uri), $headers, $body);