Justin Sheehy  committed 1345a07

Automated commit message

  • Participants
  • Parent commits bde8711

Comments (0)

Files changed (1)


 f(ReqData, Context) -> {Result, ReqData, Context}
+Context is an arbitrary {{{ term() }}} that is specific to your application.  Webmachine will never do anything other than thread it through the various functions of your resource.  This is the means by which transient application-specific request state is passed along between functions.
+{{{ReqData}}} is a {{{ #wm_reqdata{} }}} term, and is manipulated via the [[WebmachineReqData]] interface.  A resource function may access request data (such as header values) from the input value.  If a resource function wishes to affect the response data in some way other than that implied by its return value (e.g. adding an X-Header) then it should modify the returned {{{ReqData}}} term accordingly.