Skip to content

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

@androidhaha

Description

@androidhaha

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;
}));`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions