This commit is contained in:
parent
e18d428587
commit
3d67c5e815
@ -23,7 +23,7 @@ fun Application.module() {
|
|||||||
install(ContentNegotiation) {
|
install(ContentNegotiation) {
|
||||||
gson {
|
gson {
|
||||||
setPrettyPrinting()
|
setPrettyPrinting()
|
||||||
setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS")
|
setDateFormat("yyyy-MM-dd'T'HH:mm:ss")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
test.py
2
test.py
@ -10,7 +10,7 @@ FILE = 'CommonStarling_102761_45.wav'
|
|||||||
|
|
||||||
files = {
|
files = {
|
||||||
"file": (os.path.basename(FILE), open(FILE,'rb').read(), 'audio/wave', {'Content-length' : os.path.getsize(FILE)}),
|
"file": (os.path.basename(FILE), open(FILE,'rb').read(), 'audio/wave', {'Content-length' : os.path.getsize(FILE)}),
|
||||||
"description" : (None, json.dumps({"date" : datetime.now().isoformat(), "device_id" : "123"}), "application/json")
|
"description" : (None, json.dumps({"date" : today.strftime("%Y-%m-%d %H:%M:%S"), "device_id" : "123"}), "application/json")
|
||||||
}
|
}
|
||||||
|
|
||||||
r = requests.post(URL,files=files)
|
r = requests.post(URL,files=files)
|
||||||
|
Loading…
Reference in New Issue
Block a user