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

Add multiple interceptors, the interceptor After method input error #64

Open
androidhaha opened this issue Apr 20, 2020 · 0 comments
Open

Comments

@androidhaha
Copy link

androidhaha commented Apr 20, 2020

The input parameter of each interceptor is the original data, not the data processed by the previous interceptor

`AsyncStringResponse resp = AsyncStringResponse(

AsyncStringResponse.from(cloned._send(), sender: this, sent: cloned)
.then((StringResponse r) async {
StringResponse ret = r;
for (After func in cloned.getAfter) {
///The input parameter here should be ret,not r
var res = await func(r);
if (res is StringResponse) ret = res;
}
return ret;
}));`

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