Skip to content

Commit

Permalink
Merge pull request #66 from umbri/master
Browse files Browse the repository at this point in the history
minor fixes
  • Loading branch information
unreal4u authored Sep 9, 2017
2 parents 1298c99 + 0b725cd commit 8e45b52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion examples/00.send-message-amp.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@
$sendMessage->chat_id = A_USER_CHAT_ID;
$sendMessage->text = 'Hello world!';

$tgLog->performApiRequest($sendMessage);
$result = yield $tgLog->performApiRequest($sendMessage);

var_dump($result);
});
5 changes: 2 additions & 3 deletions src/HttpClientRequestHandlerAmp.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ public function get(string $uri): PromiseInterface
* @return PromiseInterface
* @throws \unreal4u\TelegramAPI\Exceptions\ClientException
*/
public function post(string $uri, array $formFields): PromiseInterface
{
$request = (new Request($uri))->withMethod('POST');
public function post(string $uri, array $formFields): PromiseInterface {
$request = new Request($uri, 'POST');

if (!empty($formFields['headers'])) {
$request = $request->withHeaders($formFields['headers']);
Expand Down

0 comments on commit 8e45b52

Please sign in to comment.