title: How can I send an HTTP PUT request in Ruby?
body: <p>I am trying to send a PUT request to a particular URL, and have thus far been unsuccessful in doing so.</p>
  
  <p>If I were doing it through an HTTP requester GUI, such as <a href="https://addons.mozilla.org/en-us/firefox/addon/httprequester/">this</a> one, it would be as simple as doing a PUT on the following url:</p>
  
  <p><code>http://www.mywebsite.com:port/Application?key=apikey&amp;id=id&amp;option=enable|disable</code></p>
  
  <p>Note that a port number is specified in the above request. I will also need to do that when submitting the request through the ruby code.</p>
  
  <p>How can I replicate such a request in Ruby?</p>