PHP code example of lamoni / restlyte
1. Go to this page and download the library: Download lamoni/restlyte 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/ */
lamoni / restlyte example snippets
$rest = new RESTLyte(
"https://spaceexample.io", // Server
"username", // Username
"password", // Password
false, // SSL Checking?
[ // Array of custom HTTP headers to send with the API call
'Cache-Control: no-cache'
]
);
$response = $rest->get(
'/api/space/device-management/devices', // API call
'JSON', // Response handler (RAW | JSON | XML)
'application/vnd.net.juniper.space.device-management.devices+json;version=1' // "Accept: "
);