Returns the best content negotiation match based on the options the server is able to support and the options the client requested in one of the header request fields that supports content negotiation. This uses standard content negotiation rules wherein the server does its best to accommodate the client based on the order of preference.

Syntax

Response = HTTP_Services('GetBestContentNegotiation', RequestHeaderField, ServerOptions)

Returns

The best content negotiation match based on the client's preference and the server's supported types. If no acceptable content match can be found, this service will automatically set a 406 (Not Acceptable) response status.

Parameters

ParameterDescription
RequestHeaderFieldThe request header field containing the acceptable client options. Required.
ServerOptionsAn @FM delimited list of options the server can accommodate. Required.

Remarks

The RequestHeaderField argument should match one of the standard HTTP request header field names which are designed for content negotiation. The current list is as follows:

Accept
Accept-Charset
Accept-Encoding
Accept-Language
  • No labels