...
Here a client sends a simple csv message with just a single entry. Odysseus does not care about the method (e.g. POST or PUT)
It is also possible to restrict the web server with credentials:
Code Block |
---|
#PARSER PQL
#RUNQUERY
input = RECEIVE({
transport = 'HTTPServer',
source = 'source',
protocol = 'Document',
datahandler = 'Document',
schema = [['content','String']],
options= [['hostname','0.0.0.0'],['port', '8080'], ['path', '/'], ['onedocpercall', 'false']
,['user','user']
,['password','pass']
]
}
) |
in this case you could e.g. send a message via curl:
Code Block |
---|
curl -u user:pass -H "Content-Type: application/json" -d '{"data": { "eventtype":"leaf","epocutc":1671112105, "zone": "bz2454", "mac_address": "%%%MAC%%%", "RSSI":0 ,"techtype": 2}}' http://X.X.X.X:8080/ |