addNext method
This method adds a middleware to the chain. This method is called by the HttpRest library, no need to call it manually, instead use HttpRestClientBuilder.addRequestMiddleware and HttpRestClientBuilder.addResponseMiddleware
Implementation
void addNext(Middleware<R> middleWare) {
if (_next == null) {
_next = middleWare;
} else {
_next?.addNext(middleWare);
}
}