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

willRequest 方法应该进行重构,这个库中应该集成 aop #12

Open
yize opened this issue Apr 9, 2016 · 1 comment
Open

Comments

@yize
Copy link

yize commented Apr 9, 2016

一般类似 willRequest 这种前置方法,应该提供一种途径,去操作后续的动作

比如这个方法,我希望回调中有 process 方法中的 context 以及 defer 等 ,然后把 defer 也传进去,用户可以决定 defer 是否需要发送请求。

使用场景

  • 用这个方法来取缓存,通过 requestDatasha1 值,获取存在本地的 cacheData see 希望加入 cache 功能 #13 ,如果有的话,直接 resolve(data) ,跟 process 方法配合,用来做离线相当棒。
@jias
Copy link
Member

jias commented Apr 25, 2016

接受,willRequestdidRequire配置将改为通过request配置实现,request接受config, datadefer为参数。

@jias jias added this to the 3.0 milestone Sep 7, 2016
@jias jias mentioned this issue Sep 7, 2016
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants