Skip to content

Commit 83066cd

Browse files
committed
Expose event on LambdaRequest class
1 parent e253303 commit 83066cd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ export { Handler, Event, Context, Result };
1616
*/
1717
export interface LambdaRequestOptions extends RequestOptions {
1818
context: Context;
19+
event: Event;
1920
}
2021

2122
/**
2223
* Extends HTTP requests with AWS Lambda context.
2324
*/
2425
export class LambdaRequest extends Request {
2526
context: Context;
27+
event: Event;
2628

2729
constructor(input: string | LambdaRequest, options: LambdaRequestOptions) {
2830
super(input, options);
2931
this.context = options.context;
32+
this.event = options.event;
3033
}
3134
}
3235

@@ -67,7 +70,8 @@ export function createHandler(app: App, options: Options = {}): Handler {
6770
headers: event.multiValueHeaders,
6871
method,
6972
body,
70-
context
73+
context,
74+
event
7175
});
7276

7377
const mapError = errorhandler(req, {

0 commit comments

Comments
 (0)