Re: Leaf Resources with child Leaf Resources

Jacek Furmankiewicz <[email protected]>
Newsgroups gmane.comp.python.twisted.web
Message-ID <CAGDztiGs3WXTK1LFjk4rBaL6iiFdH9CFSa0gYvdXUktZ_pvkog@mail.gmail.com>
Sorry, let me be more clear:

I have a Resource let's say CustomerRestService which is a leaf and handles
everything related to '/customer'
Then I want a CustomerAddressRestService Resource, which is also a leaf and
should handle everything related to '/customer/<customerId>/address'.

So I need a leaf Resource (i.e. it actually intercepts GET/POST/PUT/DELETE
requests to the root '/customer' URL)
with a child leaf Resource (which intercepts the GET/POST/PUT/DELETE
requests to its root '/customer/<customerId>/address' URL).

Twisted does not really allow for nested leaf resources, but REST is all
about nested URL schemes, e.g.

Customer -> Customer Address
Customer -> Customer Phone
Customer -> Customer Invoice -> Customer Payment

etc.

Taking CorePost out of the picture and just going back to raw twisted.web,
how would you recommend that be done?

Jacek

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.