title: Need to disable SSL certificate verification with RestSharp
body: <p>I have disabled SSL certificate verification using the Postman tool and sent a post request with 4 parameters. This method returns the correct response but I cannot seem to replicate this using VB.Net. I am using RestSharp to connect to a RESTful API and I am setting the certification validation callback to a functio that always returns true using ServicePointManager, but my problem still persists:</p>
  
  <pre><code>Public Function AcceptAllCertifications(sender As Object, certification As X509Certificate, 
                      chain As X509Chain, sslPolicyErrors As SslPolicyErrors) As Boolean
      Return True
  End Function
  
  Public Function SendRequest() As Boolean
  
      ServicePointManager.ServerCertificateValidationCallback =
              New RemoteCertificateValidationCallback(AddressOf AcceptAllCertifications)
  
      Dim client = New RestClient(TokenEndPoint) 'A basic URI endpoint
      Dim request = New RestRequest(Method.POST)
  
      request.AddHeader("Content-Type", "application/x-www-form-urlencoded")
  
      request.AddParameter("grant_type", "client_credentials")
      request.AddParameter("scope", "write")
      request.AddParameter("client_id", "client-app")
      request.AddParameter("client_secret", "secret")
  
      response = client.Execute(request)
      Console.WriteLine(response.Content)
  End Function
  </code></pre>
  
  <p>I always get:</p>
  
  <pre><code>{"The underlying connection was closed: An unexpected error occurred on a send."}
  </code></pre>
  
  <p>As the response. How can I fix this?</p>