As lightweight as it gets.
In writing a few projects, I found that many of the HTTP request libraries were a bit heavy for what I needed.
The answer was to create a super-lightweight CURL wrapper that would do the job., (*1)
Note: this package sends to a url with a POST payload, and that is it!, (*2)
Installation
This package is distributed using Packagist and Composer., (*3)
To your composer.json requires object add, (*4)
"Rtablada/slim-post" : "*"
, (*5)
Run composer install
or composer update
, (*6)
Using this package
In your sample file after autoloading SlimPost is super easy to use!, (*7)
<?php
use Rtablada\SlimPost\SlimPost;
$url = "http://somewebsite.co";
$data = array(
'name' => 'Bob',
'age' => 25
);
$results = SlimPost::create($url, $data)->send();
The results is untouched and ready for you to read however you see fit., (*8)