package caldav
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=2213432f79494809a8ea5c7726a0a264ab6770c7be74a929c65c39a27339e0a1
sha512=9c7ce48fbafa75ea309fcd49a5792976911bea857c9a3a4b334b9b75b3f65199669bacdfe62b98e34a7b5160883fd5b98d7795fd03aefad6434fa99545e26425
doc/caldav.webmachine/Webmachine/Make/class-resource/index.html
Class Make.resourceSource
The resource parent class.
constraint 'body = [> `Empty ]method resource_exists : (bool, 'body) opReturning false will result in a 404 Not Found.
Default: true
method service_available : (bool, 'body) opReturning false will result in a 503 Service Unavilable.
Default: true
method forbidden : (bool, 'body) opReturning true will result in a 403 Forbidden.
Default: false
method malformed_request : (bool, 'body) opReturning true will result in a 400 Bad Request.
Default: false
method uri_too_long : (bool, 'body) opReturning true will result in a 414 Request-URI Too Long.
Default: false
method known_content_type : (bool, 'body) opReturning false will result in a 415 Unsupported Media Type.
Default: true
method valid_content_headers : (bool, 'body) opReturning false will result in a 501 Not Implemented.
Default: true
method valid_entity_length : (bool, 'body) opReturning false will result in 413 Request Entity Too Large.
Default : true
method options : ((string * string) list, 'body) opIf the `OPTIONS method is supported by this resource, the returned list of header name/value pairs will be included in responses to `OPTIONS requests.
Default: [("allow", self#allowed_methods)]
method known_methods : (Cohttp.Code.meth list, 'body) opA request to this resource whose method is not included in the returned list will result in a 501 Not Implemented.
Default: [`GET; `HEAD; `POST; `PUT; `DELETE; `Other "TRACE"; `Other "CONNECT"; `OPTIONS]
method allowed_methods : (Cohttp.Code.meth list, 'body) opA request to this resource whose method is not included in the returned list will result in a 405 Method Not Allowed. The response will include an "allow" header that lists the allowed methods.
Default: [`GET; `HEAD]
method delete_resource : (bool, 'body) op`DELETE requests will call this method. Returning true indicates that the deletion succeeded.
Default: false
method delete_completed : (bool, 'body) opOnly successful delete_resource calls will result in a call to this method. Return false if the deletion was accepted but cannot yet be guaranteed to have finished.
Default: true
method process_post : (bool, 'body) op`POST requests will call this method. Returning true indicates the POST succeeded.
method process_property : (property_response, 'body) opmethod cannot_create : (unit, 'body) opmethod create_collection : (collection_created_response, 'body) opmethod report : (report_response, 'body) opmethod language_available : (bool, 'body) opReturning false will result in a 406 Not Acceptable.
Default: true
method charsets_provided : ((string * ('body -> 'body)) list, 'body) opmethod encodings_provided : ((string * ('body -> 'body)) list, 'body) opmethod variances : (string list, 'body) opReturns a list of header names that should be included in the response's Vary header. The standard content negotiation headers (i.e., Accept, Accept-Encoding, Accept-Charset, Accept-Language) will automatically be added if needed, and therefore do not need to be specified here.
Default: []
method is_conflict : (bool, 'body) opReturning true will result in a 409 Conflict.
Default: false
method multiple_choices : (bool, 'body) opReturning true indicates that multiple representations of the resource exist and a single one cannot be automatically chosen, resulting in a 300 Multiple Choices rather than a 200 OK.
Default: false
method previously_existed : (bool, 'body) opmethod last_modified : (string option, 'body) opmethod expires : (string option, 'body) opmethod generate_etag : (string option, 'body) opReturning Some string will use string for the ETag header.
Default: None
method finish_request : (unit, 'body) opThis method is called just before the final response is constructed and returned.
method post_is_create : (bool, 'body) opIf 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.
Default: false
method create_path : (string, 'body) opThis will be called on a POST request if post_is_create returns true. It is an error for this function not to produce a Path if post_is_create returns true. The Path returned should be a valid URI part following the dispatcher prefix. That Path will replace the previous one in the return value of wrq:disp_path(ReqData) for all subsequent resource function calls in the course of this request.
method allow_missing_post : (bool, 'body) opIf the resource accepts POST requests to nonexistent resources, then this should return true.
Default : false