2017 © Pedro Peláez
 

library rest-proxy

Simple rest proxy

image

gonzalo123/rest-proxy

Simple rest proxy

  • Friday, May 1, 2015
  • by gonzalo123
  • Repository
  • 7 Watchers
  • 36 Stars
  • 258 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 24 Forks
  • 6 Open issues
  • 2 Versions
  • 11 % Grown

The README.md

rest-proxy Build Status

Simple Rest Proxy, (*1)

Example

<?php
require_once __DIR__ . '/../vendor/autoload.php';

use Symfony\Component\HttpFoundation\Request;

use RestProxy\RestProxy;
use RestProxy\CurlWrapper;

$proxy = new RestProxy(
    Request::createFromGlobals(),
    new CurlWrapper()
    );
$proxy->register('github', 'https://api.github.com');
$proxy->run();


foreach($proxy->getHeaders() as $header) {
    header($header);
}
echo $proxy->getContent();

How to install:

Install composer:, (*2)

curl -s https://getcomposer.org/installer | php

Create a new project:, (*3)

php composer.phar create-project gonzalo123/rest-proxy proxy

Run dummy server (only with PHP5.4), (*4)

cd proxy
php -S localhost:8888 -t www/

Open a web browser and type: http://localhost:8888/github/users/gonzalo123, (*5)

The Versions

01/05 2015

dev-master

9999999-dev

Simple rest proxy

  Sources   Download

The Requires

 

31/03 2015

dev-curlExecuter

dev-curlExecuter

Simple rest proxy

  Sources   Download

The Requires