online chat with post/get request. REST method used, but not correctly