title: Restsharp 107 request fails with error "Request failed with status code Redirect"
body: <p>I am in the process of updating some code to restharp 107. This specific code interfaces with a legacy website that does not have api's and essentially scrapes data from the user side.</p>
  <p>The request I am making returns some data and redirects the user. in past versions of restsharp you would simply set FollowRedirects to false and you could read the response without redirecting. Upon upgrading to 107 it now throws an error and I can no longer read the response.</p>
  <p>Here is the error</p>
  <blockquote>
  <p>Exception Exception thrown: 'System.Net.Http.HttpRequestException' in
  System.Private.CoreLib.dll (&quot;Request failed with status code
  Redirect&quot;)    System.Net.Http.HttpRequestException</p>
  </blockquote>
  <p>Here is the code</p>
  <pre><code> var options = new RestClientOptions($&quot;{data.BaseUrl}/Admin/EditEmployee.aspx&quot;)
              {
                  ThrowOnAnyError = false,
                  Timeout = 20000,
                  CookieContainer = data.Cookies,
                  UserAgent = &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0&quot;,
                  FollowRedirects = false,
              };
  
              var client = new RestClient(options);
              var request = new RestRequest();
              request = request.AddHeader(&quot;Accept&quot;, &quot;text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8&quot;);
              request = request.AddHeader(&quot;Accept-Language&quot;, &quot;en-US,en;q=0.5&quot;);
              request = request.AddHeader(&quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;);
              request = request.AddHeader(&quot;Origin&quot;, $&quot;{data.BaseUrl}&quot;);
              request = request.AddHeader(&quot;Connection&quot;, &quot;keep-alive&quot;);
              request = request.AddHeader(&quot;Referer&quot;, $&quot;{data.BaseUrl}/Admin/EditEmployee.aspx&quot;);
              request = request.AddHeader(&quot;Cookie&quot;, $&quot;TBHFORMAUTH={tbhformauth.Value}; ASP.NET_SessionId={sessionId.Value}&quot;);
              request = request.AddHeader(&quot;Upgrade-Insecure-Requests&quot;, &quot;1&quot;);
              request = request.AddHeader(&quot;Sec-Fetch-Dest&quot;, &quot;document&quot;);
              request = request.AddHeader(&quot;Sec-Fetch-Mode&quot;, &quot;navigate&quot;);
              request = request.AddHeader(&quot;Sec-Fetch-Site&quot;, &quot;same-origin&quot;);
              request = request.AddHeader(&quot;Sec-Fetch-User&quot;, &quot;?1&quot;);
              request = request.AddHeader(&quot;Pragma&quot;, &quot;no-cache&quot;);
              request = request.AddHeader(&quot;Cache-Control&quot;, &quot;no-cache&quot;);
              request = request.AddHeader(&quot;TE&quot;, &quot;trailers&quot;);
              request = request.AddParameter(&quot;__EVENTTARGET&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;__EVENTARGUMENT&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;__VIEWSTATE&quot;, data.ViewState);
              request = request.AddParameter(&quot;__VIEWSTATEGENERATOR&quot;, &quot;68248626&quot;);
              request = request.AddParameter(&quot;__EVENTVALIDATION&quot;, data.EventValidation);
              request = request.AddParameter(&quot;ctl00_ctl00_westZone_mainMenu_Collapsed&quot;, &quot;false&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_westZone_mainMenu_SelIndex&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_westZone_informationTablesMenu_Collapsed&quot;, &quot;true&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_westZone_informationTablesMenu_SelIndex&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_westZone_marketingMenu_Collapsed&quot;, &quot;true&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_westZone_marketingMenu_SelIndex&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_westZone_productsMenu_Collapsed&quot;, &quot;true&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_westZone_productsMenu_SelIndex&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_westZone_APIManagementMenu_Collapsed&quot;, &quot;true&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_westZone_APIManagementMenu_SelIndex&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$tbxFirstName&quot;, firstName);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$tbxLastName&quot;, lastName);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$tbxLogin&quot;, userName);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$ddlRoles&quot;, &quot;0&quot;);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$ddlDepartment&quot;, &quot;10&quot;);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$newPassword1&quot;, password);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$newPassword2&quot;, password);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$btnSave&quot;, &quot;Save&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_LoginBlock1_PreventAutoCompleteUserName&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_LoginBlock1_PreventAutoCompletePassword&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_LoginBlock1_loginField&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;passwordField&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00_ctl00_LoginBlock1_gotoDashboard&quot;, &quot;ctl00_ctl00_LoginBlock1_gotoDashboard&quot;);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$ddlCompany&quot;, &quot;-1&quot;);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$phone$phoneExtension&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$phone$phone1&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$phone$phone2&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$phone$phoneExtension2&quot;, &quot;&quot;);
              request = request.AddParameter(&quot;ctl00$ctl00$centerZone$ContentPlaceHolder1$tbxSignature&quot;, &quot;&quot;);
          
              RestResponse response = await client.PostAsync(request);
  </code></pre>
  <p>Is there something new that needs to be done in order to read the initial response in addition to setting redirects to false? Or is this a possible issue with the new RestSharp update?</p>