Skip to content

Ability to edit Response body in interceptor #124

Description

@mohamed155

Since the HTTP Response body is a getter, we need a way to modify the Response body after it's fetched.

For example:

`
class APIInterceptors extends InterceptorContract {
@OverRide
Future interceptRequest({required RequestData data}) async {
return data;
}

@OverRide
Future interceptResponse({required ResponseData data}) async {
data.body = someMethodMakeSomeModifications(data.body);
return data;
}
}
`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions