title: Convert http to https using ruby
body: <p>I want to convert <code>http</code> to <code>https</code> URL in Ruby.</p>
  
  <p>Let me explain how my method works: </p>
  
  <ul>
  <li>List I'm sending post request to server to insert data into db and getting response as <code>http:devalphaserver.com/xxx/12</code>.</li>
  <li>If we hit this url it returns some data. I want this response url should convert <code>to https</code> (<code>https:devalphaserver.com/xxx/12</code>) in Ruby to do the Get Operation. </li>
  </ul>
  
  <p>The issue which I'm facing now is when I try to do get operation using <code>http</code>, I'm getting 302 Found stating that The document has moved <code>https:devalphaserver.com/xxx/12</code> here. </p>
  
  <p>Please help. Thanks!</p>