christopher-paul-shaw/endpoint-checker

There is no license information available for the latest version (v1.0.1) of this package.

Get the HTTP Code returned for a batch of URLS

v1.0.1 2018-10-16 14:36 UTC

This package is auto-updated.

Last update: 2024-04-17 09:21:05 UTC


README

This class accepts a payload with URLS and returns the array with the current status of the url

Usage

$runner = new CPS\EndpointChecker();
$payload = [
    ['url' => 'https://www.chris-shaw.com', 'title' => 'Authors Homepage'],
    ['url' => 'https://www.example.com', 'title' => 'Example Website'],
];


$result = $runner->process($payload);

Test

As features are added, there will be new tests to prove they work as intended. You can run the tests yourself using the following command.

vendor/bin/phpunit test