title: How can I post image and text MultipartForm on python3 and `requests`?
body: <p>I'm porting code from NodeJS to python3.
  I want to post image binary data and text.
  How can I do it ? Thank you.</p>
  
  <p>NodeJS</p>
  
  <pre><code>filePath = "xxx.jpeg"
  text = "xxx"
  return chakram.request("POST", "http://xxx",
       { "multipart" : [
             { "body" : fs.createReadStream(filePath),
               "Content-Type" : "image/jpeg",
               "Content-Disposition" : "name='file'; filename='" + filePath + "'"
             },
             { "body" : JSON.stringify(this.RequestData(text)),
               "Content-Type" : "application/specified-content-type-xxx"
             }
         ],
         "headers" : {
             "Authorization" : "xxx"
         }
       })
  </code></pre>
  
  <p>My Wrong Python Code with <code>requests</code>:</p>
  
  <pre><code>filePath = "xxx.jpeg"
  text = "xxx"
  headers = {
      "Authorization" : "xxx"
  }
  
  binary_data = None
  with open(file_path, 'rb') as fp:
      binary_data = fp.read()
  
  request_body = {
      "text": text,
      "type": "message",
      "from": {
          "id": "user1"
      }
  }
  files = {
      "file": (filePath, binary_data, 'image/jpeg'),
      "": ("", request_body, "application/specified-content-type-xxx")
  }
  resp = requests.post("http://xxx", files=files, headers=headers)
  </code></pre>
  
  <p>I got 500 error. </p>