title: How can I use Httparty with rails 6
body: <p>I am working on a rails application to send a post message to a server but each time i tried to send a post request to the sever there seems to be no post data sent to the server. However, if I use postman to send the message with json format the server responds correctly to the post request. I am relatively new to rails and i am not sure if my configuration is wrong. Please I need help. Here is my my code:</p>
  <pre class="lang-rb prettyprint-override"><code>def send_information
    HTTParty.post(&quot;https://example.com/api/json.php&quot;,
      :body =&gt; {   
        user: 'Nancy Cole',
        item: 'mobile phone',
        content: 'Hurray the server has received your message',
        id: 2,
      :headers =&gt; { 
        'Content-Type' =&gt; 'application/json' }
      }
    )
  end
  </code></pre>