a piece code ,simple but useful for restful tornado