From 371233c98c49795891f63185f2d04e4dfb9f9e95 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 22 Oct 2016 21:34:55 +0900 Subject: [PATCH] Add proper JSON headers to Woorimail API request --- common/framework/drivers/mail/woorimail.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/framework/drivers/mail/woorimail.php b/common/framework/drivers/mail/woorimail.php index d41072605..3ef67fb09 100644 --- a/common/framework/drivers/mail/woorimail.php +++ b/common/framework/drivers/mail/woorimail.php @@ -160,13 +160,16 @@ class Woorimail extends Base implements \Rhymix\Framework\Drivers\MailInterface $data['receiver_nickname'] = implode(',', $data['receiver_nickname']); // Define connection options. + $headers = array( + 'Accept' => 'application/json, text/javascript, */*; q=0.1', + ); $options = array( 'timeout' => 5, 'useragent' => 'PHP', ); // Send the API request. - $request = \Requests::post(self::$_url, array(), $data, $options); + $request = \Requests::post(self::$_url, $headers, $data, $options); $result = @json_decode($request->body); // Parse the result.