Skip to content

Instantly share code, notes, and snippets.

@bowbowbow
Created November 22, 2018 19:44
Show Gist options
  • Save bowbowbow/2f0b0ef3f8f53e2f9bf62e300dc24c22 to your computer and use it in GitHub Desktop.
Save bowbowbow/2f0b0ef3f8f53e2f9bf62e300dc24c22 to your computer and use it in GitHub Desktop.
import requests
filenames = ['10_1_mic1.wav','10_1_mic2.wav']
files = dict()
for filename in filenames:
f = open(filename, 'rb')
files[filename] = f
res = requests.post('http://localhost:8080/upload', files=files)
print('res :', res)
r = requests.get('http://localhost:8080/download')
with open('result.wav', 'wb') as f:
f.write(r.content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment