On Oct 17, 2016, at 07:23 PM, Mark Sapiro wrote:
>It all seems to work except editing. I can create a domain with or
>without an alias_domain, see it all listed and delete the domain, but
>any attempts at editing the domain fail with the core REST server
>returning 405 to the PATCH request. Even if I stash my changes and
>revert to the branch head, edits fail in the same way.
Hi Mark.
The way Falcon works is that you need an on_() method for every HTTP
METHOD that a resource implements. If you look at the ADomain class (or the
_DomainBase base class), it only implements an on_get() and an on_delete(),
but no on_put() or on_patch(). So when you try to invoke PUT or PATCH on a
domain resource, you get a 405, i.e. Method Not Allowed.
And afaict, your MR doesn't an on_patch().
It's a bit more work to implement PUT and PATCH, so not every resource
currently supports it. There are several examples in the code though, and
often on_put() and on_patch() differ only in the set of required attributes.
By definition, PUT requires a complete resource and PATCH allows for partial
resources. Take a look at ListArchivers in rest/lists.py for an example.
Cheers,
-Barry
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives:
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe:
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org
Security Policy: http://wiki.list.org/x/QIA9