public async Task <ChatRoom_Info> GetChatRoomInfo(HttpRequest Request, HttpResponse Response, int ID_Room) { var cookie = _userService.ReadUserCookie(Request); var result = await _chatRepo.GetChatRoomInfo(ID_Room, cookie.id, cookie.token); string a = result.Content.ReadAsStringAsync().Result; if (result.IsSuccessStatusCode) { return(JsonConvert.DeserializeObject <ChatRoom_Info>(a)); } else { await _userService.RefreshToken(Response, cookie); cookie = _userService.ReadUserCookie(Request); result = await _chatRepo.GetChatRoomInfo(ID_Room, cookie.id, cookie.token); a = result.Content.ReadAsStringAsync().Result; return(JsonConvert.DeserializeObject <ChatRoom_Info>(a)); } }