1. Justin Sheehy
  2. webmachine

Commits

Justin Sheehy  committed b29430b

Automated commit message

  • Participants
  • Parent commits 322fe89
  • Branches default

Comments (0)

Files changed (1)

File WebmachineResources.wiki

View file
  • Ignore whitespace
 |resource_exists | true | _ | Returning non-true values will result in 404 Not Found. |
 |service_available | true | _ |  |
 |is_authorized | true | AuthHead | If this returns anything other than true, the response will be 401 Unauthorized. The AuthHead return value will be used in the WWW-Authenticate header. |
+| forbidden | false | _ | |
+| allow_missing_post | false | _ | If the resource accepts POST requests to nonexistent resources, then this should return true. |
+| malformed_request | false | _ | |
+| uri_too_long | false | _ | |
+| known_content_type | true | _ | |
+| valid_content_headers | true | _ | |
+| valid_entity_length | true | _ | |
+| options | [] | [Header] | If the OPTIONS method is supported and is used, the return value of this function is expected to be a list of pairs representing header names and values that should appear in the response. |
+| allowed_methods | ['GET', 'HEAD'] | [Method] | If a Method not in this list is requested, then a 405 Method Not Allowed will be sent. Note that these are all-caps and are atoms. (single-quoted) |
+| delete_resource | false | _ | This is called when a DELETE request should be enacted, and should return true if the deletion succeeded. |
+| delete_completed | true | _ | This is only called after a successful delete_resource call, and should return false if the deletion was accepted but cannot yet be guaranteed to have finished. |
+| 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. |