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

Way to Force HTML5 Fetch? #6759

Closed
jrjohnson opened this issue Nov 19, 2019 · 5 comments
Closed

Way to Force HTML5 Fetch? #6759

jrjohnson opened this issue Nov 19, 2019 · 5 comments

Comments

@jrjohnson
Copy link
Contributor

jrjohnson commented Nov 19, 2019

Description

With Octane allowing jQuery (and our app being quite a distance from being able to switch it off) I'd still like to unify all of our data calls in fetch and be that one step closer. Could this be added as a feature flag to override the jQuery detection in useFetch?

Probably related to #6093, but not tied to the jQuery optional feature as that can be left on while still allowing fetch to be used.

@runspired
Copy link
Contributor

You should be able to set useFetch: true when extending the adapter

@Gaurav0
Copy link
Contributor

Gaurav0 commented Nov 19, 2019

I think we automatically use ember-fetch if it is installed?

@runspired
Copy link
Contributor

@Gaurav0 we don't but maybe we should? @rwjblue and @igorT what would you think of updating our useFetch computed to return true if ember-fetch is installed?

@jrjohnson
Copy link
Contributor Author

As the useFetch: true option worked for me I'm inclined to close this unless further discussion is warranted.

@rwjblue
Copy link
Member

rwjblue commented Feb 22, 2020

Ya, we can't change to fetch by default (when both ember-fetch and jQuery are present). It would be a breaking change due to things like jQuery emitting ajaxStart/ajaxComplete, jQuery.prefilter, etc).

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

4 participants