PHP code example of sinevia / php-library-http

1. Go to this page and download the library: Download sinevia/php-library-http 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/ */

    

sinevia / php-library-http example snippets


$http = new \Sinevia\HttpClent("http://localhost/");

$http->setPath('/yourpath/');

$http->post(array('user'=>'UN','pass'=>'PW'); // Data to be sent as array

echo $http->getResponseBody();
json
   "sinevia/php-library-http": "1.3.0"
   },