Replies: 3 comments
-
@romme maybe you could deal with things using the |
Beta Was this translation helpful? Give feedback.
0 replies
-
@osban that's rougly the same amount of code, went with this in the end |
Beta Was this translation helpful? Give feedback.
0 replies
-
@romme Ah cool. Yeah I wasn't quite sure how much control you needed, so if this works, it's the best option 🙂 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Long time user of the framework here. Actually it's the only framework i ever used, but nevermind, on to the feature request.
In case of REST apis which indicate failure or success as http status codes it may be cumbersome to tell error and success apart from the response object alone. Fortunately, Mithril already looks at the http status code and rejects the promise appropriately. But in case the promise is going to be rejected soon it may be undesireable to call deserialize on the response payload. What about adding a second argument to it so deserializing could be skipped?
After implementing this feature:
After writing all of this i realized that i could just deserialize manually after resolving the promise, which i'm going to do now. Still going to post this as an excuse to thank you for the great framework.
Beta Was this translation helpful? Give feedback.
All reactions