X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http%2FHeader%2Fnegotiate.md;h=dd2d1c884e4c9db75d05159fb1022416bc197020;hb=263db0c682de276ab6d4c9bacb57ed5ca3ec374a;hp=af0547ffd211055823cbe848cb67456aa889a844;hpb=7823a35136269030a351b68b8ae8ee5026696aea;p=mdref%2Fmdref-http diff --git a/http/Header/negotiate.md b/http/Header/negotiate.md index af0547f..dd2d1c8 100644 --- a/http/Header/negotiate.md +++ b/http/Header/negotiate.md @@ -2,20 +2,20 @@ Negotiate the header's value against a list of supported values in $supported. Negotiation operation is adopted according to the header name, i.e. if the -header being negotiated is ```Accept```, then a slash is used as primary type -separator, and if the header is ```Accept-Language``` respectively, a hyphen is +header being negotiated is Accept, then a slash is used as primary type +separator, and if the header is Accept-Language respectively, a hyphen is used instead. -> ***NOTE:*** The first elemement of $supported serves as a default if no operand matches. +> **Note:** The first elemement of $supported serves as a default if no operand matches. ## Params: -* ```array $supported``` +* array $supported The list of supported values to negotiate. -* Optional reference ```array &$result``` +* Optional reference array &$result Out parameter recording the negotiation results. ## Returns: -* ```NULL```, if negotiation fails. -* ```string```, the closest match negotiated, or the default (first entry of $supported). +* NULL, if negotiation fails. +* string, the closest match negotiated, or the default (first entry of $supported).