The respondWith() method of allows you to provide a promise for a Response yourself.
respondWith()
MDN Reference