title: Python 3 threading post request passing header params and data
body: <p>I'm trying to make my post requests faster because at the moment it takes 3 seconds per post. As I need to iterate it n times it could take hours. So, I started looking for threading, async calls and many others but none solved my problem. Mostly of the problems was due to the fact that I couldn't specify the headers and the params of my post request.</p>
  
  <p>My Python version is 3.6.7</p>
  
  <p>My code:</p>
  
  <pre><code>for i in range(0, 1000):
    assetId = jsonAssets[i]['id']
    uuidValue = uuid.uuid4()
  
    headers = {'Content-Type': 'application/json',}
    params = (('remember_token', '123456'),)
  
    data = ('{{"asset":'
            '{{"template":1,'
            '"uuid":"{uuidValue}", '
            '"assetid":{assetId}}}}}'
            .format(uuidValue = uuidValue, 
                    assetId = assetId))
    response = requests.post('http://localhost:3000/api/v1/assets', headers=headers, params=params, data=data)
  </code></pre>
  
  <p>Some of the tries were using:</p>
  
  <pre><code>pool.apply_async
  </code></pre>
  
  <p>or</p>
  
  <pre><code>ThreadResponse
  </code></pre>
  
  <p>But I couldn't set headers or params like in the request.post</p>
  
  <p>So, how can I make this post request using this header, params and data faster?</p>
  
  <p>Thanks in advance and sorry for any trouble, this is my first stackoverflow post.</p>