Tuesday, October 8, 2013

Adding Checksum To HTTP Response Header of JSONX Content in Datapower

Today I exposed a web service as a restful HTTP service via Datapower. I am also one of the consumers of this restful service and I push this data to clients who are subscribed to me.

However I noticed that the data I receive does not frequently change and I do not want to push same data.

So I added a http response header in Datapower which is actually a checksum of the content I requested; in my code I check this checksum if it is different from the one I got in my previous request: