Skip to content

Ability to edit Response body in interceptor #124

@mohamed155

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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions