PHPackages                             jesugmz/http-health-check - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. jesugmz/http-health-check

ActiveLibrary[HTTP &amp; Networking](/categories/http)

jesugmz/http-health-check
=========================

Simple HTTP health check written in PHP

v1.0.0(7y ago)220MITPHPPHP ^7.1

Since Jul 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jesugmz/http-health-check)[ Packagist](https://packagist.org/packages/jesugmz/http-health-check)[ RSS](/packages/jesugmz-http-health-check/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

HTTP Health Check
=================

[](#http-health-check)

[![Minimum PHP Version](https://camo.githubusercontent.com/dcd4b4aec2c1709157fa6a2c050f709d75cde9552a79cfff0b70a97fad7281ae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![CircleCI](https://camo.githubusercontent.com/db88fcf67038f4195c2c300fc57096b4ab31c986ab6bde05cb0681867c8551c0/68747470733a2f2f636972636c6563692e636f6d2f67682f6a657375474d5a2f687474702d6865616c74682d636865636b2e7376673f7374796c653d737667)](https://circleci.com/gh/jesuGMZ/http-health-check)

HTTP Health Check is a simple HTTP health check written in PHP built on top of [Guzzle](https://github.com/guzzle/guzzle).

- Easy way to check HTTP services status by status code and body content from your PHP application
- Grant finite HTTP request timeout (Guzzle does not)
- Positive behavior by default. If no conditions are provided, the health will be consider *healthy* as soon as the request can be made successfully - no connectivity issues

Installation
------------

[](#installation)

Install the latest version through [Composer](https://getcomposer.org/):

```
$ composer require jesugmz/http-health-check
```

Usage
-----

[](#usage)

HTTP Health Check will do a GET request to the given endpoint URL and can check the following conditions in the response:

- HTTP status code: expressed as `status_code_equals_to`
- Body content: plain text that appears in the body response and is expressed as `body_contains`

```
use HttpHealthCheck\HttpHealthCheck;

$endpointUrl = 'https://github.com/jesuGMZ/';
$conditions = [
    'status_code_equals_to' => 200,
    'body_contains'         => 'jesuGMZ',
];

$check = new HttpHealthCheck($endpointUrl, $conditions);

var_dump($check->isHealthy());
```

It allows also [Guzzle Request Options](http://docs.guzzlephp.org/en/stable/request-options.html) parameters:

```
use HttpHealthCheck\HttpHealthCheck;

$endpointUrl = 'https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json';
$conditions = [
    'status_code_equals_to' => 200,
    'body_contains'         => 'Super hero squad',
];
$options = [
    'headers' => [
        'User-Agent' => 'My custom user agent',
        'Accept'     => 'application/json',
    ]
];

$check = new HttpHealthCheck($endpointUrl, $conditions, $options);

var_dump($check->isHealthy());
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2903d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5565443?v=4)[Jesu Gomez](/maintainers/jesugmz)[@jesugmz](https://github.com/jesugmz)

---

Top Contributors

[![jesugmz](https://avatars.githubusercontent.com/u/5565443?v=4)](https://github.com/jesugmz "jesugmz (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jesugmz-http-health-check/health.svg)

```
[![Health](https://phpackages.com/badges/jesugmz-http-health-check/health.svg)](https://phpackages.com/packages/jesugmz-http-health-check)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.5k](/packages/aws-aws-sdk-php)[spatie/crawler

Crawl all internal links found on a website

2.8k18.5M62](/packages/spatie-crawler)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k36](/packages/neuron-core-neuron-ai)[illuminate/http

The Illuminate Http package.

11937.9M6.7k](/packages/illuminate-http)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[guzzlehttp/guzzle-services

Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.

25711.0M188](/packages/guzzlehttp-guzzle-services)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
