Skip to content

Commit

Permalink
Update post.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ReactMVC authored Aug 21, 2023
1 parent d53c683 commit f66ee8a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions examples/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@
'Content-Type: application/x-www-form-urlencoded'
)
)
->Body('email=user@gmail.com&password=123456')
->Send();

echo $response;

$statusCode = $http->getStatus();
echo "<br />Status Code: $statusCode\n";
->Body('email=user@gmail.com&password=123456');

try {
$response = $http->Send();
$statusCode = $http->getStatus();
echo "<br />Status Code: $statusCode<br />";
echo $response;
} catch (Exception $e) {
echo '<br />Error: ' . $e->getMessage();
}
}

0 comments on commit f66ee8a

Please sign in to comment.