Commits

Justin Sheehy committed 80bc472

Automated commit message

Comments (0)

Files changed (1)

WebmachineResources.wiki

 | create_path | undefined | Path | This will be called on a POST request if post_is_create returns true. If this can occur, then the Path returned should be a valid URI part following the dispatcher prefix. That Path will replace the previous one in the path value of ReqProps for all subsequent resource function calls in the course of this request. |
 | process_post | false | _ | If post_is_create returns false, then this will be called to process any POST requests. If it succeeds, it should return true. |
 | content_types_provided | {{{ [{"text/html", to_html}] }}} | {{{ [{Mediatype, Handler}] }}} | This should return a list of pairs where each pair is of the form {{{ {Mediatype, Handler} }}} where {{{Mediatype}}} is a string of content-type format and the {{{Handler}}} is an atom naming the function which can provide a resource representation in that media type.  Content negotiation is driven by this return value. For example, if a client request includes an Accept header with a value that does not appear as a first element in any of the return tuples, then a 406 Not Acceptable will be sent. |
-| content_types_accepted | {{{ [] }}} | {{{ [{Mediatype, Handler}] }}} | This is used similarly to content_types_provided, except that it is for incoming resource representations -- for example, PUT requests. |
+| content_types_accepted | {{{ [] }}} | {{{ [{Mediatype, Handler}] }}} | This is used similarly to content_types_provided, except that it is for incoming resource representations -- for example, PUT requests. Instances of this function usually want to use {{{ webmachine_reqdata:req_body(ReqData) }}} to access the incoming request body.|