//public void ProcessRequest(HttpContext context) //{ // context.Request.ContentType = "application/json"; // System.Collections.Generic.Dictionary<string, string> content = ContentParser.FromInputStream(context.Request.InputStream); // string downloadUrl = @"http://*****:*****@"D:\Projects\WebServices\"); // DownloadResult result = downloader.Result; // context.Response.ContentType = "application/json"; // context.Response.Write(result.ToString()); // context.Response.StatusCode = Convert.ToInt32(result.StatusCode); //} public override async Task ProcessRequestAsync(HttpContext context) { context.Request.ContentType = "application/json"; System.Collections.Generic.Dictionary <string, string> content = ContentParser.FromInputStream(context.Request.InputStream); Downloader downloader = new Downloader(content, "bbb", @"D:\Projects\WebServices\WebServices\insurersinfo.ini"); await downloader.Launch(); DownloadResult result = downloader.Result; context.Response.ContentType = "application/json"; context.Response.Write(result.ToString()); context.Response.StatusCode = Convert.ToInt32(result.StatusCode); }