Ejemplo n.º 1
0
 public NgrokUtils(Dictionary <string, WebAppConfig> webApps, string exePath,
                   Func <string, Task> asyncShowErrorFunc,
                   HttpClient client = null, NgrokProcess ngrokProcess = null)
 {
     _webApps              = webApps;
     _ngrokProcess         = ngrokProcess ?? new NgrokProcess(exePath);
     _showErrorFunc        = asyncShowErrorFunc;
     _ngrokApi             = client ?? new HttpClient();
     _ngrokApi.BaseAddress = new Uri("http://localhost:4040");
     _ngrokApi.DefaultRequestHeaders.Accept.Clear();
     _ngrokApi.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
 }