Replace request with core http module