package dream-accept

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Dream_acceptSource

Sourcetype media_type =
  1. | Media_type of string * string
  2. | Any_media_subtype of string
  3. | Any
Sourcetype charset =
  1. | Charset of string
  2. | Any
Sourcetype encoding =
  1. | Encoding of string
  2. | Gzip
  3. | Compress
  4. | Deflate
  5. | Identity
  6. | Any
Sourcetype language =
  1. | Language of string
  2. | Any
Sourceval accepted_charsets : 'a Dream.message -> charset list

Retrieve the accepted charset from the Accept-Charset header.

The results are ordered by their quality in decreasing order.

Sourceval accepted_charsets_with_quality : 'a Dream.message -> (int * charset) list

Retrieve the accepted charset from the Accept-Charset header with their associated quality.

The result are in the same order as the HTTP header, which is not garanteed to be in decreasing order.

Sourceval accept_charsets : (int * charset) list -> 'a Dream.message -> 'a Dream.message

Set the Accept-Charset header of the given dream message.

Sourceval accepted_encodings : 'a Dream.message -> encoding list

Retrieve the accepted encoding from the Accept-Encoding header.

The results are ordered by their quality in decreasing order.

Sourceval accepted_encodings_with_quality : 'a Dream.message -> (int * encoding) list

Retrieve the accepted encoding from the Accept-Encoding header with their associated quality.

The result are in the same order as the HTTP header, which is not garanteed to be in decreasing order.

Sourceval accept_encodings : (int * encoding) list -> 'a Dream.message -> 'a Dream.message

Set the Accept-Encoding header of the given dream message.

Sourceval accepted_languages : 'a Dream.message -> language list

Retrieve the accepted language from the Accept-Language header.

The results are ordered by their quality in decreasing order.

Sourceval accepted_languages_with_quality : 'a Dream.message -> (int * language) list

Retrieve the accepted language from the Accept-Language header with their associated quality.

The result are in the same order as the HTTP header, which is not garanteed to be in decreasing order.

Sourceval accept_languages : (int * language) list -> 'a Dream.message -> 'a Dream.message

Set the Accept-Language header of the given dream message.

Sourceval accepted_media_types : 'a Dream.message -> media_type list

Retrieve the accepted media type from the Accept header.

The results are ordered by their quality in decreasing order.

Sourceval accepted_media_types_with_quality : 'a Dream.message -> (int * media_type) list

Retrieve the accepted media type from the Accept header with their associated quality.

The result are in the same order as the HTTP header, which is not garanteed to be in decreasing order.

Sourceval accept_media_types : (int * media_type) list -> 'a Dream.message -> 'a Dream.message

Set the Accept header of the given dream message.

OCaml

Innovation. Community. Security.