initialize
[mdref/mdref-http] / http / Env / negotiateEncoding.md
1 # static string http\Env::negotiateEncoding(array $supported[, array &$result)
2
3 Negotiate the client's preferred encoding.
4
5 > ***NOTE:*** The first elemement of $supported encodings serves as a default if no encoding matches.
6
7 ## Params:
8
9 * ```array $supported```
10 List of supported content encodings.
11 * Optional reference ```array &$result```
12 Out parameter recording negotiation results.
13
14 ## Returns:
15
16 * ```NULL```, if negotiation fails.
17 * ```string```, the negotiated encoding.