Hi I'm studying about RESTful API and making a website running on local to exercise.

I think RESTful is a quite good way. CRUD operations can be identified by HTTP methods and we can handle them with one url.

But most confusing things to me is that, How can we serve HTML files which are needed to request CRUD operations?

For example, If I'm implementing a forum, I need APIs to CRUD posts in forum like

---

[GET] /forum - see all posts in forum   

[POST] /forum - create a new post   

[GET] /forum/:id - see the post of id   

[PUT] /forum/:id - modify the post of id   

[DELETE] /forum/:id - delete the post of id   

---

Think about how we use a forum, we need at least 3 type of HTML pages.

They are,  

1. a page to see all posts in forum.  

2. a page to see the specific post.  

3. a page to type title and contents to create(or modify) a new post.  

First and second type of HTML files can be served easily by GET requests above.   

But in case of third type HTML files, I need to use extra parameters with above APIs or make a new API such like /forum/createpost to serve such HTML files.

I think, in the point of view of RESTful, I miss something and need to distinguish serving static (or dynamic) HTMLs and handling CRUD requests.

What is the bestpractices to handle this problem?  

I also find some questions about this problem, but I couldn't find a clear answer.