title: Ruby Typhoeus gem - Invalid Json in body?
body: <p>I have the following code:</p>
  
  <pre><code>require 'Typhoeus'
  
    url = Typhoeus::Request.new("https://fluidsurveys.com/api/v2/webhooks/subscribe/",
          userpwd: "username_test:password_test",
          method: :post,
          body: {
               'subscription_url' =&gt; 'http://glacial-spire-test.herokuapp.com/hooks/response_created_callback',
               'event' =&gt; 'response_complete'
          },
          headers: { 'Content-Type' =&gt; "application/json"})
  
      response = url.run.body
      puts response
  </code></pre>
  
  <p>This returns a response code of <code>400</code> and an error:</p>
  
  <p><code>Content-Type set to application/json but could not decode valid JSON in request body.</code></p>
  
  <p>Here are the docs for the API call I am making: <a href="http://docs.fluidsurveys.com/api/webhooks.html" rel="nofollow">http://docs.fluidsurveys.com/api/webhooks.html</a></p>
  
  <pre><code>POST /api/v2/webhooks/subscribe/¶
  Returns a status of 409 if a webhook with the subscription url already exists. Returns a       
  status of 201 if the webhook was successfully created. Requests must be sent as an 
  application/json-encoded dictionary with the required fields subscription_url and event
  </code></pre>
  
  <p>Sample request (ACCORDING TO DOCS):</p>
  
  <pre><code>{
    "subscription_url": "http://fluidsurveys.com/api/v2/callback/",
    "event": "response_complete",
    "survey": 1,
    "collector": 1
  }
  </code></pre>
  
  <p>What am I doing wrong here? survey and collector are optional params, and I don't see an issue with the json in my body.</p>