PHPackages                             phergie/phergie-irc-plugin-http - 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. [API Development](/categories/api)
4. /
5. phergie/phergie-irc-plugin-http

AbandonedArchivedLibrary[API Development](/categories/api)

phergie/phergie-irc-plugin-http
===============================

Phergie plugin for Provide HTTP functionality to other plugins

4.1.0(9y ago)41.3k64MITPHPPHP ^7.0||^5.6

Since Jun 25Pushed 7y ago4 watchersCompare

[ Source](https://github.com/phergie/plugin-http)[ Packagist](https://packagist.org/packages/phergie/phergie-irc-plugin-http)[ RSS](/packages/phergie-phergie-irc-plugin-http/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (4)Versions (13)Used By (4)

HTTP Plugin
===========

[](#http-plugin)

[Phergie](http://github.com/phergie/phergie-irc-bot-react/) plugin for Provide HTTP functionality to other plugins.

[![Build Status](https://camo.githubusercontent.com/ab1d24ab7db7050d711d8bd44f16cabc4ff646f2fecc28146652db347912f9ee/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f706865726769652f706c7567696e2d687474702e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/phergie/plugin-http)

Install
-------

[](#install)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `~`.

```
composer require phergie/phergie-irc-plugin-http

```

See Phergie documentation for more information on [installing and enabling plugins](https://github.com/phergie/phergie-irc-bot-react/wiki/Usage#plugins).

Requirements
------------

[](#requirements)

The HTTP plugin requires the [DNS plugin](https://github.com/phergie/plugin-dns) to be setup for DNS resolving.

Configuration
-------------

[](#configuration)

```
return [

    'plugins' => [

        // dependency
        new \Phergie\Plugin\Dns\Plugin, // Needed to do DNS lookups

        new \Phergie\Plugin\Http\Plugin([

            // All configuration is optional

            'dnsResolverEvent' => 'dns.resolver', // Event for retrieving the DNS resolver, defaults to 'dns.resolver'

            'guzzleClientOptions' => [], // Array with options passed into the Guzzle Client constructor (don't set a handler in here it will be overwritten)

        ]),

    ]
];
```

Usage
-----

[](#usage)

### Get Guzzle HTTP Client

[](#get-guzzle-http-client)

```
$this->emitter->emit('http.client', [
    function (GuzzleHttp\Client $client) {
        // Make HTTP requests as documented on the Guzzle docs: http://guzzle.readthedocs.org/en/latest/clients.html#asynchronous-requests
        // When making requests make sure to pass the future flag as documented: http://guzzle.readthedocs.org/en/latest/faq.html#can-guzzle-send-asynchronous-requests
    },
]);
```

### Make a HTTP request

[](#make-a-http-request)

```
$this->emitter->emit('http.request', [new \Phergie\Plugin\Http\Request([
    'url' => 'https://github.com/',                     // Required
    'resolveCallback' => function($response) { // Required
        // Data received do something with it
    },
    'method' => 'GET',                                  // Optional, request method
    'headers' => array(),                               // Optional, headers for the request
    'body' => '',                                       // Optional, request body to write after the headers
    'rejectCallback' => function($error) {},            // Optional, callback that gets triggered on connection errors
])]);
```

A note about `resolveCallback` and `rejectCallback`. `rejectCallback` will only fire on a socket error. So `resolveCallback` will be called no matter what [`HTTP status code`](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) as the request has been successful on a connection level. Choosing the appropriate response to a status code is up to the event callee.

Tests
-----

[](#tests)

To run the unit test suite:

```
curl -s https://getcomposer.org/installer | php
php composer.phar install
cd tests
../vendor/bin/phpunit

```

License
-------

[](#license)

Released under the MIT License. See `LICENSE`.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 88.2% 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

Every ~104 days

Recently: every ~124 days

Total

10

Last Release

3404d ago

Major Versions

1.0.0 → 2.0.02014-11-16

2.1.1 → 3.0.0-alpha12015-09-12

3.0.1 → 4.0.02015-12-29

PHP version history (3 changes)2.0.0PHP &gt;=5.4.0

4.0.0PHP ^5.5||^7.0

4.1.0PHP ^7.0||^5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/bcee902e735164c0ac8b0b362f5a1b0f29323921cabbc8f1f3fa65aecb42718a?d=identicon)[svpernova09](/maintainers/svpernova09)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (134 commits)")[![svpernova09](https://avatars.githubusercontent.com/u/967362?v=4)](https://github.com/svpernova09 "svpernova09 (9 commits)")[![elazar](https://avatars.githubusercontent.com/u/15487?v=4)](https://github.com/elazar "elazar (3 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")[![sitedyno](https://avatars.githubusercontent.com/u/216721?v=4)](https://github.com/sitedyno "sitedyno (2 commits)")[![nfauchelle](https://avatars.githubusercontent.com/u/1188162?v=4)](https://github.com/nfauchelle "nfauchelle (1 commits)")[![matthewtrask](https://avatars.githubusercontent.com/u/4731244?v=4)](https://github.com/matthewtrask "matthewtrask (1 commits)")

---

Tags

pluginbotreactircphergiephergieplugin

### Embed Badge

![Health badge](/badges/phergie-phergie-irc-plugin-http/health.svg)

```
[![Health](https://phpackages.com/badges/phergie-phergie-irc-plugin-http/health.svg)](https://phpackages.com/packages/phergie-phergie-irc-plugin-http)
```

PHPackages © 2026

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