title: Am I able to reuse a HttpWebRequest?
body: <p>Am I able to reuse a HttpWebRequest?</p>
  
  <p>It seems like the 3rd request to a site causes a operation to time out. It seems like each request creates a new connection, so I want to know if I can reuse a HttpWebRequest by changing the url and getting the request again. The code in question is below. This code checks if a range of urls exists.</p>
  
  <pre><code>    static void storeList(TextWriter sw, string urlTemplate, int start, int end)
      {
          for (int i = start; i &lt; end; i++)
          {
              var url = string.Format(urlTemplate, i);
              var req = (HttpWebRequest)HttpWebRequest.Create(url);
              {
                  req.Method = "HEAD";
                  tryHttpWebRequest
                  {
                      var resp = req.GetResponse();
                      sw.WriteLine(i);
                  }
                  catch (Exception e)
                  {
                  }
              }
          }
          sw.Flush();
      }
  </code></pre>