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 fetch instead of ajax for HTTP requests #69

Closed
mapreal19 opened this issue Aug 23, 2015 · 7 comments · Fixed by #73
Closed

Use fetch instead of ajax for HTTP requests #69

mapreal19 opened this issue Aug 23, 2015 · 7 comments · Fixed by #73

Comments

@mapreal19
Copy link
Contributor

window.fetch seems the way to go for http requests.

Resources:

@alex35mil
Copy link
Member

Pros:

  • Proposed standard compatible.

Cons:

  • Client-only -> Second lib for server-side calls.

@justin808
Copy link
Member

@alexfedoseev If we assumed we would not need to make remote calls on the server (rending the JS using Rails engine), then is fetch a better choice?

@alex35mil
Copy link
Member

Haha, I forgot that we're outside of Node here 😅
In this case fetch is perfectly ok.

@PlasticLizard
Copy link
Contributor

Also, if you were on node, you could use this

@justin808
Copy link
Member

@mapreal19 Could you take a try at this one and submit a PR?

@mapreal19
Copy link
Contributor Author

@justin808 sure!

@justin808
Copy link
Member

Check out shakacode/react_on_rails#16 (comment)

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

Successfully merging a pull request may close this issue.

4 participants