File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ HTTPBinary.prototype.emit = function(cloudevent){
18
18
_headers [ "Content-Type" ] = cloudevent . getContenttype ( ) ;
19
19
20
20
_headers [ "CE-EventType" ] = cloudevent . getType ( ) ;
21
+ _headers [ "CE-EventTypeVersion" ] = cloudevent . getEventTypeVersion ( ) ;
21
22
_headers [ "CE-CloudEventsVersion" ] = cloudevent . getSpecversion ( ) ;
22
23
23
24
_headers [ "CE-Source" ] = cloudevent . getSource ( ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,11 @@ function Spec01(_caller){
15
15
* Inject the method to set the version related to data attribute.
16
16
*/
17
17
this . caller . prototype . eventTypeVersion = function ( _version ) {
18
- this . spec . eventTypeVersion ( _version ) ;
18
+ return this . spec . eventTypeVersion ( _version ) ;
19
+ } ;
20
+
21
+ this . caller . prototype . getEventTypeVersion = function ( ) {
22
+ return this . spec . getEventTypeVersion ( ) ;
19
23
} ;
20
24
}
21
25
@@ -50,6 +54,10 @@ Spec01.prototype.eventTypeVersion = function(version){
50
54
return this ;
51
55
} ;
52
56
57
+ Spec01 . prototype . getEventTypeVersion = function ( ) {
58
+ return this . payload [ "eventTypeVersion" ] ;
59
+ } ;
60
+
53
61
Spec01 . prototype . source = function ( _source ) {
54
62
this . payload [ "source" ] = _source ;
55
63
return this ;
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ var cloudevent =
27
27
. schemaurl ( schemaurl )
28
28
. data ( data ) ;
29
29
30
+ cloudevent . eventTypeVersion ( "1.0.0" ) ;
31
+
30
32
var httpcfg = {
31
33
method : "POST" ,
32
34
url : webhook + "/json"
You can’t perform that action at this time.
0 commit comments