Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Promises for REST JS clients #2795

Open
finnurthorisson opened this issue Apr 2, 2024 · 0 comments
Open

Use Promises for REST JS clients #2795

finnurthorisson opened this issue Apr 2, 2024 · 0 comments

Comments

@finnurthorisson
Copy link

serveRestJSClient! uses the old JS callback method while modern JS prefers Promises. This can be added without breaking the existing API by returning a Promise and keeping the callbacks.

If this is fine I'd be willing to make a PR.

I'd also be interested in replacing the XHR spaghetti with fetch. Both Promise and fetch have been supported for ~10 years and only lack support in IE (is this a problem?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant