WardrikHTTP.Input (wardrik_http v0.1.0-rc.1)

Copy Markdown

Builds an operation's input from a request.

The input merges, in order, so later ones win:

  1. the JSON body
  2. the query string
  3. the path parameters

For webhooks and channels, the input is the raw request instead: "body" and "headers". Bodies over 8 MB are refused.

Summary

Functions

Returns the input for operation from conn and the path params it was routed by.

Functions

build(conn, operation, params)

@spec build(Plug.Conn.t(), WardrikProtocol.operation(), map()) ::
  {:ok, map(), Plug.Conn.t()} | {:error, Wardrik.Error.t()}

Returns the input for operation from conn and the path params it was routed by.