Plug.Parsers

Plug.Parsers behaviour

A plug for parsing the request body.

This module also specifies a behaviour that all the parsers to be used with Plug should adopt.

Options

  • :parsers - a list of modules to be invoked for parsing. These modules need to implement the behaviour outlined in this module.

  • :pass - an optional list of MIME type strings that are allowed to pass through. Any mime not handled by a parser and not explicitly listed in :pass will raise UnsupportedMediaTypeError. For example:

    • ["*/*"] - never raises
    • ["text/html", "application/*"] - doesn’t raise for those values
    • [] - always raises (default)