X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http%2FEnv%2FnegotiateContentType.md;h=d5ee50094e8010b73bf39ae0d7cb4dca2176534d;hb=c2e4d7edf424ea7684c31fc15310ab563a27725f;hp=510e33f176630342ddc20bc6a78af521c15d1b53;hpb=7823a35136269030a351b68b8ae8ee5026696aea;p=mdref%2Fmdref-http diff --git a/http/Env/negotiateContentType.md b/http/Env/negotiateContentType.md index 510e33f..d5ee500 100644 --- a/http/Env/negotiateContentType.md +++ b/http/Env/negotiateContentType.md @@ -2,24 +2,24 @@ Negotiate the client's preferred MIME content type. -> ***NOTE:*** The first elemement of $supported content types serves as a default if no content-type matches. +> **Note:** The first elemement of $supported content types serves as a default if no content-type matches. ## Params: -* ```array $supported``` +* array $supported List of supported MIME content types. -* Optional reference ```array &$result``` +* Optional reference array &$result Out parameter recording negotiation results. ## Returns: -* ```NULL```, if negotiation fails. -* ```string```, the negotiated content type. +* NULL, if negotiation fails. +* string, the negotiated content type. ## Example: -A client indicates his accepted MIME content types by sending an ```Accept``` -header. The static ```http\Env``` class provides a facility to negotiate the +A client indicates his accepted MIME content types by sending an Accept +header. The static http\Env class provides a facility to negotiate the client's preferred content type: