# Welcome Back

If you missed the first episode, check here.

Also, source code is available at https://github.com/t2ee/tutorial-series-1. Or

In the last section, we built a basic todo list servier with get functions and set all the things right.

Now, we should add create, update and delete abilities to it.

# Here We Go

As we have already setup properly, now all have to do is to add methods to the controller.

# POST Item

Now we are implementing a method for creating todo items (remember to import neccesary components from @t2ee/vader).

@Consumes('application/json') tells vader to consume request body as json.

@Body binds the requested body. At this moment, we haven’t done any type checking yet, so it’s an any variable.

@Path('/:id?'), the parameter in @Path() is slightly different from what we used in getItem(). In this format, we can make parameter id optional. Thus, we can get id from either body or path.

# PUT and DELETE item

Like how we implmeneted the postItem method, put and delete should be almost the same.

# Conclusion

Now we have a full functional todo item api service. In the next section, we will be discussing some other advantage usages with @t2ee components.

Controller should be look like following: