title: How to write a POST request with SSL version = TLS, I got SSL_connect SYSCALL returned=5 errno=0
body: <p>I want to rewrite this curl script in Ruby</p>
  
  <p>Which use POST to put some data to server via SSL</p>
  
  <pre><code>  curl -k https://&lt;SERVER_ADDR&gt;:443/ -i \
    -H "Accept: application/json" \
    -H "Content-Type:application/json" \
    -X POST -d @${1} https://&lt;SERVER_ADDR&gt;:443/service/
  </code></pre>
  
  <p>This Curl script works, but the following ruby script not works.</p>
  
  <p>I use the rest-client library <a href="https://github.com/rest-client/rest-client" rel="nofollow">https://github.com/rest-client/rest-client</a></p>
  
  <p>I got the error<code>#&lt;OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server hello A&gt;</code></p>
  
  <pre><code>header = {
    "Accept" =&gt; " application/json",
    "Content-Type" =&gt; "application/json"
  }
  
    resp = RestClient.post(server_url, content, header)
  </code></pre>
  
  <p>How could I rewrit the curl in Ruby version ?</p>