PHP code example of lib-hub / restrequest
1. Go to this page and download the library: Download lib-hub/restrequest 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/ */
lib-hub / restrequest example snippets
$productsRequest = new RestRequest($baseUrl . "/product");
$productsRequest->post("payload"); // create new product
$productsRequest->put("1", "data"); // update first product
$productsRequest->patch("1", "data"); // edit first product
$productsRequest->delete("1"); // delete first product
$productsRequest->get(); // get all products
$productsRequest->get("1"); // get first product