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

怎么在didFetch中获取xhr对象 #37

Open
liutanrong opened this issue Dec 23, 2016 · 2 comments
Open

怎么在didFetch中获取xhr对象 #37

liutanrong opened this issue Dec 23, 2016 · 2 comments

Comments

@liutanrong
Copy link

现在项目中需要判断请求的状态码,但遍查文档未发现如何在didFetch这一方法中获得xhr对象,希望您能解答

@liutanrong
Copy link
Author

const _api=vars.mark._api;
    var result=_api.split(".");
    var allApi=systemAContext.api;
    for(let i=0;i<result.length;i++){
      allApi=allApi[result[i]];
    }
    const xhr=allApi._requester;

目前我是通过您在#33中的私有api来查找,这种方法以后是否会继续支持

@jias
Copy link
Member

jias commented Dec 26, 2016

后续即使升级,也会给出兼容性方案。

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

2 participants