Is it redundant to have a REST controller in a servlerss application that has http events?
e.g. Imagine a serverless application like this:
functions: hello: handler: com.sandbox.serverless.Handler::handleRequest events: - http: path: message/hello method: get
Would it be redundant to have the handler method proxy a REST controller? If I had a REST controller, it would do this work:
- Respond to HTTP event
- Validate input
- Invoke business layer function
- Return response to caller
Should I just do this work in the handler function?