mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-12 07:11:42 +09:00
Add proper JSON headers to Woorimail API request
This commit is contained in:
parent
645edf12bd
commit
371233c98c
1 changed files with 4 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue