4. Example (esempio)
Un client invia una richiesta POST usando la Content Coding "compress" ([RFC7231], Sezione 3.1.2.1):
POST /edit/ HTTP/1.1
Host: example.org
Content-Type: application/atom+xml;type=entry
Content-Encoding: compress
...compressed payload...
Il server rifiuta la richiesta perché consente solo la Content Coding "gzip":
HTTP/1.1 415 Unsupported Media Type
Date: Fri, 09 May 2014 11:43:53 GMT
Accept-Encoding: gzip
Content-Length: 68
Content-Type: text/plain
This resource only supports the "gzip" content coding in requests.
A questo punto, il client può ripetere la richiesta con la Content Coding "gzip" supportata.
In alternativa, un server che non supporta alcuna Content Coding nelle richieste potrebbe rispondere con:
HTTP/1.1 415 Unsupported Media Type
Date: Fri, 09 May 2014 11:43:53 GMT
Accept-Encoding: identity
Content-Length: 61
Content-Type: text/plain
This resource does not support content codings in requests.