Justin Sheehy avatar Justin Sheehy committed e59cf26

Automated commit message

Comments (0)

Files changed (1)

WebmachineResources.wiki

 | post_is_create | false | _ | If POST requests should be treated as a request to put content into a (potentially new) resource as opposed to being a generic submission for processing, then this function should return true. If it does return true, then create_path will be called and the rest of the request will be treated much like a PUT to the Path entry returned by that call. |
 | 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_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. |
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.