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
I also use extensions similar to these in my own projects. As you have illustrated the difficulty is in choosing appropriate defaults for things like Date encoding and the status code to return.
Hi @gotev I've been thinking a lot about your suggestion think there is a nice declarative solution SE-0389 Attached Macros available in Swift 5.9 and later.
I'm interested in your feedback, the implementation is currently available on the branch preview/macro where handlers can annotate functions with routes:
JSON responses are common for a web server. With this extension (serializing dates as millis by default to ease JS clients):
one can easily return a JSON ready to be consumed by another application:
If you think it's a valuable addition, feel free to add it in the library 🍻
The text was updated successfully, but these errors were encountered: