File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ class withState {
17
17
this . req . getHeaders = this . getHeaders . bind ( this )
18
18
this . req . getQuery = this . getQuery . bind ( this )
19
19
this . req . getParams = this . getParams . bind ( this )
20
+ this . req . getCookies = this . getCookies . bind ( this )
20
21
this . req . getBody = this . getBody . bind ( this )
21
22
this . req . setBody = this . setBody . bind ( this )
22
23
this . req . getSingleArrayFile = this . getSingleArrayFile . bind ( this )
@@ -47,6 +48,10 @@ class withState {
47
48
return get ( this . req . state , path , defaultValue )
48
49
}
49
50
51
+ getCookies ( path ?: any , defaultValue ?: any ) : any {
52
+ return getterObject ( this . req . cookies , path , defaultValue )
53
+ }
54
+
50
55
getBody ( path ?: any , defaultValue ?: any ) : any {
51
56
return getterObject ( this . req . body , path , defaultValue )
52
57
}
You can’t perform that action at this time.
0 commit comments