NGSIv2 clients can customize HTTP notification messages using a simple template mechanism.
Considering the following notification notification.httpCustom object:
"httpCustom": {
"url": "http://foo.com/entity/${id}",
"headers": {
"Content-Type": "text/plain"
},
"method": "PUT",
"qs": {
"type": "${type}"
},
"payload": "The temperature is ${temperature} degrees"
}
The token ${temperature} will be parsed by current context value.
Thinking that attribute could have a metadata value could contain custom data like a ${temperature.scale}, to store values of '°C' or '°F' for example.
NGSIv2 clients can customize HTTP notification messages using a simple template mechanism. Considering the following notification
notification.httpCustom
object:The token
${temperature}
will be parsed by current context value.Thinking that attribute could have a metadata value could contain custom data like a
${temperature.scale}
, to store values of '°C' or '°F' for example.https://stackoverflow.com/questions/45717033/how-to-use-attribute-metadata-token-in-orion-context-broker-notification-custom