File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,15 @@ PHP-HTTP: standardized HTTP for PHP
7
7
:alt: HTTPlug Logo
8
8
9
9
PHP-HTTP is the next step in standardizing HTTP interaction for PHP packages.
10
+
10
11
It builds on top of PSR-7 _, which defines interfaces for HTTP requests and
11
- responses. PSR-7 does not describe, however, the way you should create requests
12
- or send them. PHP-HTTP aims to fill that gap by offering an HTTP client
13
- interface: HTTPlug.
12
+ responses. The HTTPlug HTTP client interface has been standardized in PSR-18 _
13
+ to define synchronous HTTP requests. When using a client that implements PSR-18,
14
+ we recommend directly using PSR-18 and not HTTPlug nor our adapters.
15
+
16
+ However, PSR-18 does not define asynchronous requests. HTTPlug provides interfaces
17
+ for those, but to do that also needs to define how :doc: `promises <components/promise >`
18
+ are implemented.
14
19
15
20
PHP-HTTP has three goals:
16
21
@@ -19,9 +24,8 @@ PHP-HTTP has three goals:
19
24
20
25
2. Provide good quality HTTP-related packages to the PHP community.
21
26
22
- 3. Over time, make HTTPlug a PHP Standards Recommendation (PSR) so that clients
23
- will directly implement the HTTPlug interface and our adapters are no longer
24
- needed.
27
+ 3. Now that PSR-18 exists, we miss a PSR for asynchronous requests. This is blocked
28
+ by not having a PSR for promises.
25
29
26
30
HTTPlug
27
31
-------
You can’t perform that action at this time.
0 commit comments