problem description
in fast application
development, use Promise
method. In view of the complete situation, using finally
does not work properly. Consult some materials to know that the fast application official specification does not support finally, so how to solve this problem?
related codes
import fetch from "@system.fetch"
fetch.fetch({
url: params.url,
method: params.method,
data: params.data
})
.then(response => {
// ....
})
.catch((error, code) => {
console.log(`request fail, code = ${code}`)
})
.finally(() => {
// ?
})