I came across this page in Joomla's documentation and this page, are they the same thing? And are these capable of sending POST requests to an external API?
-
Please don't make researchers and volunteers link-chase. Please hardcode the focus of your question directly into your question body. Links help to support posts, but they must never be fully relied upon to complete a question. Please copy-paste the smallest necessary portion of content and use quote block formatting. – mickmackusa♦ Sep 7 '20 at 22:53
As you might already figured out, yes its the same and yes thats the way it works...
As described in the manual:
use Joomla\Http\HttpFactory;
// Create an instance of a default Http object.
$http = Http\HttpFactory::getHttp();
// Prepare the update data.
$data = array('make' => 'Holden', model => 'EJ-Special');
// Invoke the GET request.
$response = $http->post('http://api.example.com/cars/1', $data);
HavFun!