title: Sending a POST request using httplib
body: <p>I'm trying to send data using <code>httplib</code>. Here is my code:</p>
  
  <pre><code>headers = {'User-agent': 'agent','Accept': 'application/json'}
  params = { 'api_key':'kjdksnjd45555','ts':455555555}
  data = {'job1':42,'job2':85}
  params['data'] = json.dumps(data,separators =(',',':'))
  re = requests.post(url,headers,params)
  print re.json()   
  </code></pre>
  
  <p>When I using requests, it work very nice, but not when I use <code>httplib</code> </p>
  
  <pre><code>params = urllib.urlencode(params)
  con = httplib.HTTPConnection('api.sandbox.gengo.com')
  con.request("POST", "/api/v", param, headers)
  r2 = con.getresponse()
  r2.read()
  </code></pre>
  
  <p>It returns the following error :  </p>
  
  <pre><code>"msg":"\\"api_key\\" is a required field"}  
  </code></pre>
  
  <p>(This means that it can not recover my data.)</p>
  
  <p>What can I try? Thanks.</p>