add handler for processing websocket message and modify method of post, delete and put