Hi guys,
I receive message content from a monitoring device in a formal like this:
POST /monitor/status
HTTP/1.1
Host: testingtesting.com
Connection:
Keep-Alive
Content-Type:
application/x-www-form-urlencoded
Authorization: Basic
cmVtb3RlX2 cmVtb3RlX2NsaWVudNsaWVud=
Content-Length: 78
&reading[0]=0004A38E5835;
&reading[1]=0004A3D3F18B;
&reading[2]=0004A3D3F18B;
Now if there was only one reading, then I could just use:
formFields('reading) { reading =>
complete {
logger.debug("Monitoring data received: " + reading)
....
}
But what is the best way to access an array of measurements like the ones above. Is there some sort of directive available for this?
Thanks in advance. I hope there is someone out there who had a little more coffee than me.
Kind regards,
Jacobus