title: Send http post request with unicoded data using python requests
body: <p>I want to send a post request to REST api, but with all my characters unicode encoded, for example the string <code>test</code> i want to send as <code>\u0074\u0065\u0073\u0074</code>. Whatever i try, the string ends up as <code>\\u0074\\u0065\\u0073\\u0074</code>. I can easily modify the request in for example Burp, and remove the double backslashes, to make it work.</p>
  
  <p>So the raw bytes sent to the webserver is <code>\x5c\x5c\x75\x30\x30\x37\x34\x5c\x5c\x75\x30\x30\x36\x35\x5c\x5c\x75\x30\x30\x37\x33\x5c\x5c\x75\x30\x30\x37\x34</code></p>
  
  <p>While what i want is:
  <code>\x5c\x75\x30\x30\x37\x34\x5c\x75\x30\x30\x36\x35\x5c\x75\x30\x30\x37\x33\x5c\x75\x30\x30\x37\x34</code></p>
  
  <p>One of the things I've tried is this:</p>
  
  <pre><code>import requests
  
  s = 'test'
  data = ''
  for c in s:
      data +=  "\\u00"+hex(ord(c))[2:].lower()
  print(data)
  json =  {"user":data}
  res = requests.post('http://127.0.0.1/api/getusers', json=json)
  print(res.text)
  </code></pre>
  
  <p>even if i set <code>data = '\x5c\x75\x30\x30\x37\x34\x5c\x75\x30\x30\x36\x35\x5c\x75\x30\x30\x37\x33\x5c\x75\x30\x30\x37\x34'</code> is still sends double back slahes (<code>\x5x\x5c</code>)</p>