Skip to content

Commit

Permalink
modify send single sms api
Browse files Browse the repository at this point in the history
  • Loading branch information
ywchang0612 committed Nov 25, 2021
1 parent d874740 commit 3ca2f95
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@ public function sendBatch(array $messages)
*/
public function send(Message\Message $message)
{
return $this->sendBatch([$message]);
$request = $this->client->newRequest(
'POST',
$this->client->buildUriWithQuery('/api/mtk/SmSend', ['CharsetURL' => 'UTF-8'] + $message->toArray()),
'application/x-www-form-urlencoded'
);

$response = $this->client->sendRequest($request);

return $this->parseMessageResponse($response);
}

/**
Expand Down

0 comments on commit 3ca2f95

Please sign in to comment.