title: Converting curl to ruby equivalent
body: <p>I'm having trouble converting a curl to a ruby script. Basically I'm trying to consume the parse.com RESTful api. Here is the curl</p>
  
  <pre><code>curl -X POST \
  -H "X-Parse-Application-Id: XXX" \
  -H "X-Parse-REST-API-Key: YYY" \
  -H "Content-Type: application/json" \
  -d '{
     "channels": [
       "Giants",
       "Mets"
     ],
     "data": {
       "alert": "test message"
     }
   }' \
   https://api.parse.com/1/push
  </code></pre>
  
  <p>And this Is what I've been trying to do (using HttParty)</p>
  
  <pre><code>puts "hello world"
  
  require 'httparty'
  
  require 'json'
  
  class Parse
      include HTTParty
      base_uri "api.parse.com:443"
      headers "X-Parse-Application-Id" =&gt; "XXX", "X-Parse-REST-API-Key" =&gt;  "YYY", "Content-Type" =&gt; "application/json"
  
  end
  
  option = {:channels =&gt; "Giants", :data =&gt; {:alert =&gt; "un mensaje de mierda"}}
  puts Parse.post("/1/push", body: option.to_json)
  </code></pre>
  
  <p>)</p>
  
  <p>I'm getting an error code 107 saying invalid json. Any suggestions will be appreciated.</p>