1. Go to this page and download the library: Download khalyomede/pulsar-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stdClass Object
(
[userId] => 1
[id] => 1
[title] => sunt aut facere repellat provident occaecati excepturi optio reprehenderit
[body] => quia et suscipit
suscipit recusandae consequuntur expedita et cum
reprehenderit molestiae ut ut quas totam
nostrum rerum est autem sunt rem eveniet architecto
)
$response = pulsar()->data([
'title' => 'Test your PHP libraries with Matcha',
'userId' => 1,
'body' => 'Lorem ipsum'
])->post('https://jsonplaceholder.typicode.com/posts');
print_r($response->content());
stdClass Object
(
[title] => Test your PHP libraries with Matcha
[userId] => 1
[body] => Lorem ipsum
[id] => 101
)
Array
(
[userId] => 1
[id] => 1
[title] => sunt aut facere repellat provident occaecati excepturi optio reprehenderit
[body] => quia et suscipit
suscipit recusandae consequuntur expedita et cum
reprehenderit molestiae ut ut quas totam
nostrum rerum est autem sunt rem eveniet architecto
)