bool Util::Download(RequestParameter param, string file) { HttpRequest request; Downloader downloader; downloader.SetFile(file); request.SetListener(&downloader); request.SetRequestParameter(param); return request.Get(10); }
bool Util::Download(string host, string url, int port, string file) { HttpRequest request; Downloader downloader; downloader.SetFile(file); request.SetListener(&downloader); request.SetHost(host); request.SetIpPort(port); request.SetUrl(url); return request.Get(10); }