@@ -14,7 +14,6 @@ A super lightweight PSR-7 implementation. Very strict and very fast.
14
14
| Description | Guzzle | Zend | Slim | Nyholm |
15
15
| ---- | ------ | ---- | ---- | ------ |
16
16
| Lines of code | 3 000 | 3 000 | 1 700 | 1 000 |
17
- | PHP7 | No | Yes | No | Yes |
18
17
| PSR-7* | 66% | 100% | 75% | 100% |
19
18
| PSR-17 | No | Yes | Yes | Yes |
20
19
| HTTPlug | No | No | No | Yes |
@@ -30,16 +29,16 @@ A super lightweight PSR-7 implementation. Very strict and very fast.
30
29
composer require nyholm/psr7
31
30
```
32
31
33
- If you are using Symfony Flex then you get all message factories registered as services.
32
+ If you are using Symfony Flex then you get all message factories registered as services.
34
33
35
34
## Usage
36
35
37
36
The PSR-7 objects do not contain any other public methods than those defined in
38
- the [ PSR-7 specification] ( https://www.php-fig.org/psr/psr-7/ ) .
37
+ the [ PSR-7 specification] ( https://www.php-fig.org/psr/psr-7/ ) .
39
38
40
39
### Create objects
41
40
42
- Use the PSR-17 factory to create requests, streams, URIs etc.
41
+ Use the PSR-17 factory to create requests, streams, URIs etc.
43
42
44
43
``` php
45
44
$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory();
@@ -49,8 +48,8 @@ $stream = $psr17Factory->createStream('foobar');
49
48
50
49
### Sending a request
51
50
52
- With [ HTTPlug] ( http://httplug.io/ ) or any other PSR-18 (HTTP client) you may send
53
- requests like:
51
+ With [ HTTPlug] ( http://httplug.io/ ) or any other PSR-18 (HTTP client) you may send
52
+ requests like:
54
53
55
54
``` bash
56
55
composer require kriswallsmith/buzz
@@ -66,7 +65,7 @@ $response = $psr18Client->sendRequest($request);
66
65
67
66
### Create server requests
68
67
69
- The [ ` nyholm/psr7-server ` ] ( https://github.com/Nyholm/psr7-server ) package can be used
68
+ The [ ` nyholm/psr7-server ` ] ( https://github.com/Nyholm/psr7-server ) package can be used
70
69
to create server requests from PHP superglobals.
71
70
72
71
``` bash
@@ -102,10 +101,10 @@ $response = $psr17Factory->createResponse(200)->withBody($responseBody);
102
101
103
102
## Our goal
104
103
105
- This package is currently maintained by [ Tobias Nyholm] ( http://nyholm.se ) and
104
+ This package is currently maintained by [ Tobias Nyholm] ( http://nyholm.se ) and
106
105
[ Martijn van der Ven] ( https://vanderven.se/martijn/ ) . They have decided that the
107
- goal of this library should be to provide a super strict implementation of
108
- [ PSR-7] ( https://www.php-fig.org/psr/psr-7/ ) that is blazing fast.
106
+ goal of this library should be to provide a super strict implementation of
107
+ [ PSR-7] ( https://www.php-fig.org/psr/psr-7/ ) that is blazing fast.
109
108
110
109
The package will never include any extra features nor helper methods. All our classes
111
- and functions exist because they are required to fulfill the PSR-7 specification.
110
+ and functions exist because they are required to fulfill the PSR-7 specification.
0 commit comments