You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to switch to the HttpClientWorkerJob you need to replace:
var worker = new Worker(new SocketWorkerJob(uri));
with var worker = new Worker(new HttpClientWorkerJob(uri));
In the demo WPF app this is in MainWindow.xaml.cs in the StartButton_Click method. You will find something similar in the console application.
I wanted to inject some cookies into the request - in order to do this you need to modify HttpClientWorkerJob to add the cookie when the HttpClient is instantiated e.g.
var cookieContainer = new CookieContainer();
var cookieHandler = new HttpClientHandler {
CookieContainer = cookieContainer
};
var cookie = new Cookie("cookieName", "cookieValue");
cookie.Domain = "https://somedomain.com";
cookieContainer.Add(cookie);
_httpClient = new HttpClient(cookieHandler);
Could you please explain how do we configure or switch between the workers. Read me is confusing.
The text was updated successfully, but these errors were encountered: