• This repository has been archived on 27/Jun/2022
  • Stars
    star
    843
  • Rank 54,052 (Top 2 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 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
23,172
star
2

promises

Promises/A+ library for PHP with synchronous support
PHP
7,584
star
3

streams

[DEPRECATED] Provides a simple abstraction over streams of data
PHP
637
star
4

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
5

oauth-subscriber

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

guzzle_sphinx_theme

Sphinx theme used by Guzzle
HTML
169
star
7

guzzle3

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

uri-template

PHP
138
star
9

command

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

cache-subscriber

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

retry-subscriber

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

log-subscriber

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

progress-subscriber

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

message-integrity-subscriber

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

test-server

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

.github

Default community health files
3
star