title: Creating Http request or proxy authentication to access a site using a token
body: <pre><code>public void Setup()
  {
      _driver = Driver.GenerateWebDriver(browser, &quot;local&quot;);
      var network = _driver.Manage().Network;
      network.AddRequestHandler(new NetworkRequestHandler
      {
          RequestMatcher = data =&gt; data.Url.Contains(&quot;www-stage.ibselectronics.com&quot;),
              RequestTransformer = data =&gt;
              {
                  if (data.Method == &quot;POST&quot;)
                  {
                      var plainTextBytes = Encoding.UTF8.GetBytes(data.PostData);
                      var base64String = Convert.ToBase64String(plainTextBytes);
                      data.PostData = base64String;
                  }
                  data.Headers[&quot;CF-Access-Client-Id&quot;] = &quot;token here.access&quot;;
                  data.Headers[&quot;CF-Access-Client-Secret&quot;] = &quot;token here&quot;;
                  return data;
              },
      });
      Task task = network.StartMonitoring();
      _driver.Navigate().GoToUrl(baseUrl);
      task.Wait();
  }
  </code></pre>
  <blockquote>
  <p>this is my code I put it on setup so that before the browser will open
  this code will be execute but I encounter this error &quot;One or more
  errors occurred. (Unexpected error creating WebSocket DevTools
  session.)&quot; hope someone there will help any advice on how this will be
  execute or there is another way to post access a site using http
  header request ?</p>
  </blockquote>
  <ul>
  <li></li>
  </ul>