Web::Machine::Util::ContentNegotiation(3pm)

Web::Machine::Util::ContentNegotiation3pm

Module to handle content negotiation

Usage

  use Web::Machine::Util::ContentNegotiation;

Version

version 0.17

Overview

This module provides a set of functions used in content negotiation.

Functions

"choose_media_type ( $provided, $header )"

Given an ARRAY ref of media type strings and an HTTP header, this will return the matching HTTP::Headers::ActionPack::MediaType instance.

"match_acceptable_media_type ( $to_match, $accepted )"

Given a media type string to match and an ARRAY ref of media type objects, this will return the first matching one.

"choose_language ( $provided, $header )"

Given a list of language codes and an HTTP header value, this will attempt to negotiate the best language match.

"choose_charset ( $provided, $header )"

Given a list of charset name and an HTTP header value, this will attempt to negotiate the best charset match.

"choose_encoding ( $provided, $header )"

Given a list of encoding name and an HTTP header value, this will attempt to negotiate the best encoding match.

Support

bugs may be submitted through <https://github.com/houseabsolute/webmachine-perl/issues>.

Releases

5 releases since Debian 9 (Stretch); the text changed 3 times.

  1. 9–10
  2. 11
  3. 12
  4. 13

Authors

•

Stevan Little <[email protected]>

•

Dave Rolsky <[email protected]>

From libweb-machine-perl 0.17-4 in Debian 13 (Trixie). Parsed by carta from the page's man source.