2017 © Pedro Peláez
 

library http

Gephart HTTP Component

image

gephart/http

Gephart HTTP Component

  • Sunday, April 1, 2018
  • by MichalKatuscak
  • Repository
  • 1 Watchers
  • 0 Stars
  • 94 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 9 % Grown

The README.md

Gephart HTTP

Build Status, (*1)

Dependencies

  • PHP >= 7.1
  • psr/http-message = 1.0.1

Instalation

composer require gephart/http dev-master

Using

Request:, (*2)

$request = (new Gephart\Http\RequestFactory())->createFromGlobals();

Response:, (*3)

<?php

use Gephart\Http\Response;
use Gephart\Http\Stream;

class JsonResponseFactory
{
    public function createResponse($content, int $statusCode = 200, $headers = [])
    {
        $body = json_encode($content);

        $stream = new Stream("php://temp", "rw");
        $stream->write($body);

        $response = new Response($stream, $statusCode, $headers);
        return $response;
    }
}

$reponse = (new JsonResponseFactory)->createResponse(["data"=>"data"]);

The Versions

13/10 2017

0.5.4

0.5.4.0 https://github.com/gephart/http

Gephart HTTP Component

  Sources   Download

MIT

The Requires

 

The Development Requires

13/10 2017

0.5.3

0.5.3.0 https://github.com/gephart/http

Gephart HTTP Component

  Sources   Download

MIT

The Requires

 

The Development Requires

13/10 2017

0.5.2

0.5.2.0 https://github.com/gephart/http

Gephart HTTP Component

  Sources   Download

MIT

The Requires

 

The Development Requires

13/10 2017

0.5.1

0.5.1.0 https://github.com/gephart/http

Gephart HTTP Component

  Sources   Download

MIT

The Requires

 

The Development Requires

08/10 2017

0.5

0.5.0.0 https://github.com/gephart/http

Gephart HTTP Component

  Sources   Download

MIT

The Requires

 

The Development Requires