Simplify server http code by using future.resolver()