2017 © Pedro Peláez
 

library http-server

some http server tool library of the swoole

image

swoole-libs/http-server

some http server tool library of the swoole

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % 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

09/03 2018

dev-master

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

some http server tool library of the swoole

  Sources   Download

MIT

The Requires

 

php library tool