Lets you handle actions on the resource.
The :identifier slot lets you know which action is called. This
method is called for the POST requests, and routing should
be handled by yourself. Here is a typical example of what
it can look like:

Returns a 404 Page Not Found. Raising a resource-not-found error
doesn’t make sense.

Generic Function: save-itemSTORAGE RESOURCE

Saves an item in the storage, creating it if needed.

Since resources are created or updated with PUT requests, as long as you
have an ID, a resource exists. Except if the user doesn’t have permission
to PUT non-existing resources, but that’s handled at the application level,
not at the storage level, which only cares that a resource has an identifier.

6.1.3 Classes

Class: acceptor()

Base class for the acceptor, subclassing
a hunchentoot acceptor to be able to handle incoming requests.

This class defines the following slot:

- ‘resource-definition‘: defines the list of resources and
how to handle them. This is a hash table that must:
- define a string key being the prefix for the resources
- for each key, define a value being a hash table. This
hash table must:
- define a keyword key named ‘:class‘ being the resource
class.
- define a keyword named ‘:collection‘ being the collection
class.
- define a keyword named ‘:storage‘ being the storage instance.
- define a keyword named ‘:children‘ being a new resource
definition, if necessary.

This is an example of a resource definition (assuming the readers
macros to define hash tables using brackets):

The metaclass for resources, required to be
used by all the resources.

This metaclass allows resources to use new slot options:

- ‘is-identifier‘: defaults to NIL. Only one slot per resource
should set this option to T. It will make the slot the identifier
of the resource. The identifier is used to find the resource in
the API. When set to T, the slot option ‘required‘ is implicitly
set to T too.
- ‘required‘: defaults to NIL. When set to T, this slot will
be required in the API requests.
- ‘default‘: defaults to ‘""‘. If the slot is not required,
this value will be used to fill in the slot value if no value
is provided.
- ‘excluded‘: defaults to NIL. When to set T, this slot will be
ignored for the resource’s CRUD actions. For example, the
‘restful:resource‘ class uses it for its ‘parent‘ and ‘storage‘
slots.