title: Read file from Requests module in Python
body: <p>I'm trying to create a web service using Python or R. This web service should 
  be able to receive a file as an input and process it. So far i have made the API request as follow in Python:</p>
  
  <pre><code>import requests
  with open('userdata.txt','rb') as payload:
      r = requests.post('https://localhost:8080/upload', data=payload, verify=False)
  </code></pre>
  
  <p>However, i am not sure how to setup the "/upload" web service. I have python and/or R available to process the request as it is on a server that i cant gain further access to. The overall task is to receive the file, load a machine learning algorithm, classify the text inside the file and return an answer with a score, if that changes anything.</p>
  
  <p>Thanks in advance! </p>