2017 © Pedro Peláez
 

library http

FastD Http

image

fastd/http

FastD Http

  • Thursday, May 10, 2018
  • by JanHuang
  • Repository
  • 3 Watchers
  • 14 Stars
  • 7,898 Installations
  • PHP
  • 15 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 67 Versions
  • 8 % Grown

The README.md

FastD HTTP Server and Client

Build Status Support Swoole Support PSR7 Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

简单的 Http 协议组件, 用于解析 Http 请求信息, 实现 PSR-7 标准, 支持 Swoole 扩展., (*2)

以上库可以满足大部分 HTTP 请求处理相关工作, 支持 Swoole 处理, 具体请看项目Swoole。, (*3)

要求

  • php >= 5.6

安装

composer require "fastd/http" -vvv

文档

文档, (*4)

使用

HTTP 组件封装了常用的服务端解释,客户端请求,并且友好集成 Swoole Http Server 解析,实现PSR-7。, (*5)

HTTP 组件没有对 Session 进行封装, 如果想在项目中支持 Session, 可以通过 Session 组件进行扩展., (*6)

获取 pathinfo
use FastD\Http\ServerRequest;

$request = ServerRequest::createServerRequestFromGlobals();

$request->getUri()->getPath();
Swoole Http 服务器
$http = new swoole_http_server("127.0.0.1", 9501);

$http->on('request', function ($request, $response) {
    $server = SwooleServerRequest::createServerRequestFromSwoole($request);
    $response->end($server->getUri()->getPath());
});

$http->start();
cURL 请求

Request 对象内部封装了 cURL 请求, 可以直接通过方法调用, (*7)

$request = new Request('GET', 'https://api.github.com/');

$request->setReferrer('http://example.com/');

$response = $request->send(); // FastD\Http\Response

响应内容会通过 Response 对象返回。, (*8)

贡献

非常欢迎感兴趣,愿意参与其中,共同打造更好PHP生态,Swoole生态的开发者。, (*9)

如果你乐于此,却又不知如何开始,可以试试下面这些事情:, (*10)

联系

如果你在使用中遇到问题,请联系: bboyjanhuang@gmail.com. 微博: 编码侠, (*11)

License MIT

The Versions

10/05 2018

dev-master

9999999-dev

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

09/05 2018

3.0.x-dev

3.0.9999999.9999999-dev

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

09/05 2018

v3.0.28

3.0.28.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

08/05 2018

v3.2.3

3.2.3.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

08/05 2018

v3.2.2

3.2.2.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

02/04 2018

v3.0.27

3.0.27.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

02/04 2018

v3.2.1

3.2.1.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

23/01 2018

dev-develop

dev-develop

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

23/01 2018

v3.2.0

3.2.0.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

23/01 2018

v3.0.26

3.0.26.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

30/11 2017

v3.0.25

3.0.25.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

12/10 2017

3.1.x-dev

3.1.9999999.9999999-dev

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

12/10 2017

v3.0.24

3.0.24.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

12/09 2017

v3.0.23

3.0.23.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

30/06 2017

v5.0.0-alpha1

5.0.0.0-alpha1

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

19/06 2017

v3.0.22

3.0.22.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

14/06 2017

v3.0.21

3.0.21.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

13/06 2017

v3.0.20

3.0.20.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

03/06 2017

v3.0.19

3.0.19.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

26/05 2017

v3.0.18

3.0.18.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

19/05 2017

v3.0.17

3.0.17.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

19/05 2017

v3.2.0-rc1

3.2.0.0-RC1

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

16/05 2017

v3.0.16

3.0.16.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

15/05 2017

v3.0.15

3.0.15.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

27/04 2017

v3.0.14

3.0.14.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

18/04 2017

v3.0.13

3.0.13.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

18/04 2017

v3.0.12

3.0.12.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

18/04 2017

v3.0.11

3.0.11.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

10/04 2017

v3.0.10

3.0.10.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

06/04 2017

v3.0.9

3.0.9.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

10/03 2017

v3.0.8

3.0.8.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

08/03 2017

v3.0.7

3.0.7.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

10/02 2017

v3.0.6

3.0.6.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

10/02 2017

v3.0.5

3.0.5.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

08/02 2017

v3.0.4

3.0.4.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

05/02 2017

v3.0.3

3.0.3.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

01/02 2017

v3.0.2

3.0.2.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

18/01 2017

v3.0.1

3.0.1.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

10/01 2017

v3.0.0

3.0.0.0

FastD Http

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

23/11 2016

dev-feature-psr17

dev-feature-psr17

FastD Http.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JanHuang

http fastd

04/08 2016

2.0.x-dev

2.0.9999999.9999999-dev

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Avatar JanHuang

http fastd

04/08 2016

v2.0.2

2.0.2.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Avatar JanHuang

http fastd

29/06 2016

v2.0.1

2.0.1.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Avatar JanHuang

http fastd

27/06 2016

v2.0.0

2.0.0.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Avatar JanHuang

http fastd

19/06 2016

v2.0.0-beta2

2.0.0.0-beta2

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Avatar JanHuang

http fastd

11/05 2016

v2.0.0-beta1

2.0.0.0-beta1

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=7

 

The Development Requires

by Avatar JanHuang

http fastd

06/01 2016

1.0.x-dev

1.0.9999999.9999999-dev

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

05/01 2016

v1.0.3

1.0.3.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

31/12 2015

1.0.2.x-dev

1.0.2.9999999-dev

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

23/12 2015

v1.0.1

1.0.1.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

23/09 2015

v1.0.0

1.0.0.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

23/09 2015

v1.0.0-rc3

1.0.0.0-RC3

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

15/09 2015

v1.0.0-rc2

1.0.0.0-RC2

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

15/09 2015

v1.0.0-rc1

1.0.0.0-RC1

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

15/09 2015

v1.0.0-BETA5

1.0.0.0-beta5

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

15/09 2015

v1.0.0-BETA4

1.0.0.0-beta4

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

12/09 2015

v1.0.0-BETA3

1.0.0.0-beta3

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

12/09 2015

v1.0.0-BETA2

1.0.0.0-beta2

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

02/09 2015

v1.0.0-BETA1

1.0.0.0-beta1

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

25/08 2015

v0.1.7

0.1.7.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

25/08 2015

v0.1.6

0.1.6.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

28/07 2015

v0.1.5

0.1.5.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

25/07 2015

v0.1.4

0.1.4.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

24/07 2015

v0.1.3

0.1.3.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

24/07 2015

v0.1.2

0.1.2.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

21/07 2015

v0.1.1

0.1.1.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd

18/07 2015

v0.1.0

0.1.0.0

FastD simple http component.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Avatar JanHuang

http protocol fastd