diff --git a/lib/cloudevent.js b/lib/cloudevent.js index 4f05de3..3efd1c5 100644 --- a/lib/cloudevent.js +++ b/lib/cloudevent.js @@ -26,6 +26,9 @@ Cloudevent.prototype.format = function(){ // Check the constraints this.spec.check(); + // To run asData() + this.getData(); + // Then, format return this.formatter.format(this.spec.payload); };