mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
16 lines
364 B
JavaScript
16 lines
364 B
JavaScript
'use strict';
|
|
|
|
module.exports.handler = (event, context, callback) => {
|
|
const resolve = () =>
|
|
callback(null, {
|
|
statusCode: 200,
|
|
body: JSON.stringify({
|
|
path: event.path,
|
|
method: event.httpMethod,
|
|
headers: event.headers,
|
|
}),
|
|
});
|
|
if (event.path === '/bar/timeout') setTimeout(resolve, 2000);
|
|
else resolve();
|
|
};
|