title: Rails HTTP - POST
body: <p>I am sending HTTP POST request:</p>
  
  <pre><code>data = { id: 1, name: 'ABC' }
  
  uri = URI.parse('http://localhost:3000/events')
  http = Net::HTTP.new(uri.host, uri.port)
  http.post(uri, data.to_json)
  </code></pre>
  
  <p>My routes file:</p>
  
  <pre><code>Rails.application.routes.draw do
    post '/events' =&gt; 'receiver#create'
  end
  </code></pre>
  
  <p>Whereas create methods looks like:</p>
  
  <pre><code>def create
   package = {
    id: ,
    name: 
   }
  end
  </code></pre>
  
  <p>How can I get access to data values passing via request? My goal is to assign it to new hash within create method</p>