title: Connection reset by peer GO
body: <p>I'm trying to do a request in GO but I always receive "Connection reset by peer" error. The following code shows how I'm doing the request:</p>
  
  <pre><code>req, err := http.NewRequest("GET", url, nil)
  if err != nil {
      return nil, err
  }
  client := = &amp;http.Client{}
  resp, err := client.Do(req)
  
  if err != nil {
      return nil, err
  }
  
  defer resp.Body.Close()
  fmt.Println(resp.Body)
  </code></pre>
  
  <p>...and I receive: </p>
  
  <pre><code>Get https://example.com: read tcp 1.2.3.4:1234-&gt;5.6.7.8:5678: read: connection reset by peer
  </code></pre>
  
  <p>When I do curl <a href="https://example.com" rel="nofollow noreferrer">https://example.com</a> I receive response form the server.
  Why can't I do the request in GO?</p>