I'm almost afraid to pose this question, there should be an obvious answer that I missed, but here I go:
Context: I am creating a blog for educational purposes (I want to learn python and web.py). I decided there were posts on my blog, so I created a Post class. I also decided that messages could be created, read, updated or deleted (therefore CRUD). Therefore, in my Post class, I created methods that respond to the POST, GET, PUT, and DELETE HTTP methods). So far, so good.
The current problem I am facing is conceptual, I know that sending a PUT HTTP message (with a modified message), for example, / post / 52, should update the message with identifier 52 with the contents of the HTTP message body.
What I don't know is how to use the edit page (HTML) correctly.
Will it do this: / post / 52 / edit violates the idea of ββa URI, since βeditβ is not a resource, but an action?
On the other hand, can this be considered a resource, since all the URI will respond to is a GET method that will only return an HTML page?
So my last question is this: how can I serve an HTML page for editing a user in RESTful?
source share