2017 © Pedro Peláez
 

library http-server

some http server tool library of the swoole

image

swoole-kit/http-server

some http server tool library of the swoole

  • Monday, April 30, 2018
  • by inhere
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 100 % Grown

The README.md

http server

Quick Start

use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Swokit\Http\Serer\HttpServer;
use Swokit\Http\Serer\Util\ClosureWrapper;
use PhpComp\Http\Message\HttpFactory;

$http = new HttpServer([
    // 
]);

$http->setRequestHandler(ClosureWrapper::create(function(ServerRequestInterface $r): ResponseInterface {
    $psr7res = HttpFactory::createResponse();
    $psr7res->write('hello. URI: '. (string)$r->getUri());

    return $psr7res;
}));

$http->run();

license

MIT, (*1)

The Versions

30/04 2018

dev-master

9999999-dev https://github.com/swoole-kit/http-server

some http server tool library of the swoole

  Sources   Download

MIT

The Requires

 

php library tool

30/04 2018

v1.0.0

1.0.0.0 https://github.com/swoole-kit/http-server

some http server tool library of the swoole

  Sources   Download

MIT

The Requires

 

php library tool