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

h5问题收集一览 #6

Open
Jmingzi opened this issue May 9, 2017 · 2 comments
Open

h5问题收集一览 #6

Jmingzi opened this issue May 9, 2017 · 2 comments

Comments

@Jmingzi
Copy link
Owner

Jmingzi commented May 9, 2017

  • ios7不支持promise,采用polyfill
import Promise from 'promise-polyfill'
if (!window.Promise) {
    window.Promise = Promise;
}
@Jmingzi
Copy link
Owner Author

Jmingzi commented May 10, 2017

  • axios 请求默认不带凭证
import axios from 'axios'
// 带上cookie
axios.defaults.withCredentials = true

@Jmingzi
Copy link
Owner Author

Jmingzi commented May 10, 2017

  • fetch请求时,默认都是不带凭证的
fetch('/users', {
  credentials: 'same-origin'
})

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