public http(model.HttpSetup __options = null) { if (__options == null) { this.options = new HttpSetup(); } else { this.options = __options; } var globalCurlInitResult = nac.CurlThin.CurlNative.Init(); // this gets called once, but we init curl easy every request }
public static nac.CurlHttpClient.LowLevel.http create(Action <nac.CurlHttpClient.LowLevel.model.HttpSetup> onSetup = null) { var options = new nac.CurlHttpClient.LowLevel.model.HttpSetup() { onNewHttpResponse = (_curlResult) => { System.Diagnostics.Debug.WriteLine(_curlResult.ToString()); } }; onSetup?.Invoke(options); var http = new nac.CurlHttpClient.LowLevel.http(options); return(http); }