title: Am I sending a date object correctly to the request body? Python
body: <p>I am sending a POST request via python urllib and urllib2 libraries.
  I am able to send the request, but it is ignoring the dates <code>(values)</code>. </p>
  
  <p>In the documentation, it says I need to pass the date object on the request body. Bellow is the code I am using.</p>
  
  <pre><code>url = 'https://api.kenshoo.com/v2/reports/5233/runs/?ks=105'
  values = {'dateRange': {'from':'2015-09-22', 'to':'2015-09-22'}}
  data = urllib.urlencode(values)
  
  req = urllib2.Request(url, data)
  
  req.add_header('Content-Type', 'application/json; charset=utf-8')
  req.add_header('Content-Length', 0)
  
  response = urllib2.urlopen(req)
  </code></pre>
  
  <p>From the API documentation, this is what I know about the date format.</p>
  
  <blockquote>
    <p>"The request body must contain a dates range in YYYY-MM-DD format, i.e.</p>
  </blockquote>
  
  <pre><code> {"dateRange":{"from":"2014-10-20", "to":"2014-10-22"}}
  </code></pre>
  
  <p>The complete documentation for the request can be found here
  <a href="http://docs.api.kenshoo.com/#!/Reports/runReport" rel="nofollow">http://docs.api.kenshoo.com/#!/Reports/runReport</a></p>