Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 656 Bytes

index.md

File metadata and controls

26 lines (21 loc) · 656 Bytes

Documentation

use WBW\Library\Curl\Factory\CurlFactory;
use WBW\Library\Curl\Request\RequestInterface;

// Create a cURL request.
$request = CurlFactory::newCurlRequest(RequestInterface::REQUEST_POST);;
$request->getConfiguration()->setHost("http://domain.tld");
$request->setRessourcePath("/resource-path");
$request->addQueryData("id", 1);
$request->addPostData("firstname", "John");
$request->addPostData("lastname", "DOE");
// ...

// Call the request.
$response = $request->call();

// Handle the response.
// ...

IMPORTANT NOTICE:

An example is available into this library