• This repository has been archived on 27/Jun/2022
  • Stars
    star
    845
  • Rank 51,741 (Top 2 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 9 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[DEPRECATED] Simple handler system used to power clients and servers in PHP (this project is no longer used in Guzzle 6+)

RingPHP

Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function. RingPHP be used to power HTTP clients and servers through a PHP function that accepts a request hash and returns a response hash that is fulfilled using a promise, allowing RingPHP to support both synchronous and asynchronous workflows.

By abstracting the implementation details of different HTTP clients and servers, RingPHP allows you to utilize pluggable HTTP clients and servers without tying your application to a specific implementation.

<?php
require 'vendor/autoload.php';

use GuzzleHttp\Ring\Client\CurlHandler;

$handler = new CurlHandler();
$response = $handler([
    'http_method' => 'GET',
    'uri'         => '/',
    'headers'     => [
        'host'  => ['www.google.com'],
        'x-foo' => ['baz']
    ]
]);

$response->then(function (array $response) {
    echo $response['status'];
});

$response->wait();

RingPHP is inspired by Clojure's Ring, which, in turn, was inspired by Python's WSGI and Ruby's Rack. RingPHP is utilized as the handler layer in Guzzle 5.0+ to send HTTP requests.

Documentation

See http://ringphp.readthedocs.org/ for the full online documentation.

More Repositories

1

guzzle

Guzzle, an extensible PHP HTTP client
PHP
22,941
star
2

psr7

PSR-7 HTTP message library
PHP
7,820
star
3

promises

Promises/A+ library for PHP with synchronous support
PHP
7,527
star
4

streams

[DEPRECATED] Provides a simple abstraction over streams of data
PHP
640
star
5

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.
PHP
251
star
6

oauth-subscriber

Signs Guzzle requests using OAuth 1.0 (Guzzle 6+)
PHP
242
star
7

guzzle_sphinx_theme

Sphinx theme used by Guzzle
HTML
168
star
8

guzzle3

[DEPRECATED] This is end of life and not maintained. Migrate to https://github.com/guzzle/guzzle
PHP
151
star
9

command

Provides the foundation for building web service clients with Guzzle
PHP
110
star
10

uri-template

PHP
104
star
11

cache-subscriber

[DEPRECATED] Private transparent proxy cache that caches HTTP responses (Guzzle 5+)
PHP
63
star
12

retry-subscriber

[DEPRECATED] Retries failed requests using customizable retry strategies. Guzzle 4/5 only.
PHP
61
star
13

log-subscriber

[DEPRECATED] Logs HTTP requests and Responses as they are sent over the wire. Not used in Guzzle 6.
PHP
43
star
14

progress-subscriber

[DEPRECATED] Emits upload and download progress events (Guzzle 4)
PHP
19
star
15

message-integrity-subscriber

[DEPRECATED] Verifies the integrity of HTTP responses using customizable validators. Guzzle 4/5.
PHP
12
star
16

test-server

A node.js server and a PHP controller class one can use when testing
JavaScript
8
star
17

.github

Default community health files
3
star