File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @ima/core " : patch
3+ ---
4+
5+ add getMethod and getRequest methods to Request class; add getResponse method to Response class
6+
7+
Original file line number Diff line number Diff line change @@ -91,8 +91,18 @@ export class Request {
9191 return this . _request ? this . _request . ips || [ ] : [ ] ;
9292 }
9393
94+ /**
95+ * Returns the HTTP method of the request.
96+ */
9497 getMethod ( ) {
9598 return this . _request ? this . _request . method : '' ;
9699 }
100+
101+ /**
102+ * Returns the raw request.
103+ */
104+ getRequest ( ) : ExpressRequest | undefined {
105+ return this . _request ;
106+ }
97107}
98108// @endif
Original file line number Diff line number Diff line change @@ -175,5 +175,12 @@ export class Response {
175175 headers : this . _internalHeadersStorage ,
176176 } ;
177177 }
178+
179+ /**
180+ * Returns the ExpressJS response object.
181+ */
182+ getResponse ( ) : ExpressResponse | undefined {
183+ return this . _response ;
184+ }
178185}
179186// @endif
You can’t perform that action at this time.
0 commit comments