onResponse method
Called when the response is about to be resolved.
Implementation
@override
void onResponse(
Response response,
ResponseInterceptorHandler handler,
) {
// If printOnSuccess is defined and set to true, call the _renderCurlRepresentation method and pass the requestOptions from the response
if (printOnSuccess != null && printOnSuccess == true) {
_renderCurlRepresentation(response.requestOptions);
}
// Call the next response handler
return handler.next(response);
}