fix:更新已知bug,优化代码
This commit is contained in:
20
vendor/guzzlehttp/psr7/README.md
vendored
20
vendor/guzzlehttp/psr7/README.md
vendored
@@ -380,10 +380,28 @@ of the header. When a parameter does not contain a value, but just
|
||||
contains a key, this function will inject a key with a '' string value.
|
||||
|
||||
|
||||
## `GuzzleHttp\Psr7\Header::normalize`
|
||||
## `GuzzleHttp\Psr7\Header::splitList`
|
||||
|
||||
`public static function splitList(string|string[] $header): string[]`
|
||||
|
||||
Splits a HTTP header defined to contain a comma-separated list into
|
||||
each individual value:
|
||||
|
||||
```
|
||||
$knownEtags = Header::splitList($request->getHeader('if-none-match'));
|
||||
```
|
||||
|
||||
Example headers include `accept`, `cache-control` and `if-none-match`.
|
||||
|
||||
|
||||
## `GuzzleHttp\Psr7\Header::normalize` (deprecated)
|
||||
|
||||
`public static function normalize(string|array $header): array`
|
||||
|
||||
`Header::normalize()` is deprecated in favor of [`Header::splitList()`](README.md#guzzlehttppsr7headersplitlist)
|
||||
which performs the same operation with a cleaned up API and improved
|
||||
documentation.
|
||||
|
||||
Converts an array of header values that may contain comma separated
|
||||
headers into an array of headers with no comma separated values.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user