This commit is contained in:
parent
1bb96f90a1
commit
53b6b23ccc
@ -65,7 +65,7 @@ class InputServiceServer {
|
|||||||
val queueName = channel.queueDeclare().queue
|
val queueName = channel.queueDeclare().queue
|
||||||
channel.queueBind(queueName, rabbitExchangeName, "")
|
channel.queueBind(queueName, rabbitExchangeName, "")
|
||||||
|
|
||||||
val gson = GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create()
|
val gson = GsonBuilder().setDateFormat("yyyy-MM-dd").setPrettyPrinting().create()
|
||||||
|
|
||||||
get("/sample"){
|
get("/sample"){
|
||||||
call.respond(resultObjectService.getAllInputObjects())
|
call.respond(resultObjectService.getAllInputObjects())
|
||||||
|
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.date.today().strftime("%Y-%m-%d %H:%M:%S"), "device_id" : "123"}), "application/json")
|
"description" : (None, json.dumps({"date" : datetime.date.today().strftime("%Y-%m-%d"), "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