You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Using with React and Vite](https://jcubic.github.io/react-wayne-auth/)
610
+
*[PWA/Cache](https://jcubic.github.io/wayne/pwa/)
557
611
558
612
The source code for the demos can be found
559
613
[in the docs' directory at the gh-pages branch](https://github.com/jcubic/wayne/tree/gh-pages/docs).
@@ -604,6 +658,7 @@ each of those methods accepts string as the first argument. The second argument
604
658
605
659
Additional methods:
606
660
*`redirect()` - accept URL or optional first argument that is the number of HTTP code
661
+
*`respond(res)` - accept Response object in case you want to use a different [Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response).
607
662
*`sse([options])` - function creates Server-Sent Event stream, the return object has a method `send` that sends a new event.
608
663
*`fetch(url | Request)` - method will send a normal HTTP request to the server and return the result to the client. You can use the default Request object from the route.
609
664
*`download(data, { filename })` - a method that can be used to trigger file download. The data can be a `string` or `arrayBuffer` you can use native fetch API and call `await res.text()` or `await res.arrayBuffer()` and pass the result as data.
0 commit comments