addTransform method
Implementation
void addTransform(HttpAgentRequestTransformFn fn, [int? priority]) {
// Keep the pipeline sorted at all time, by priority.
priority ??= fn.priority ?? 0;
final i = _pipeline.indexWhere((x) => (x.priority ?? 0) < priority!);
fn.priority = priority;
_pipeline.insert(i >= 0 ? i : _pipeline.length, fn);
}