Txpost.Parsers.CBOR (Txpost v0.1.0-beta.3) View Source

A Plug.Parsers module for parsing CBOR request bodies.

CBOR documents that dont decode to maps are parsed into a "_cbor" key to allow param merging. An empty request body is parsed as an empty map.

Example

Add the parser your app's list of parsers.

plug Plug.Parsers,
  parsers: [
    :json,
    Txpost.Parsers.CBOR
  ]