public IHttpRequestInterceptionBuilder OnRequest(HttpMethod method, string url = null) { var interceptor = new HttpRequestInterception(method, url); RegisteredInterceptions.Add(interceptor); return(interceptor); // so the caller can customize it }
public IHttpRequestInterceptionBuilder OnRequest(Func <HttpRequest, bool> requestPredicate = null) { var interceptor = new HttpRequestInterception(requestPredicate); RegisteredInterceptions.Add(interceptor); return(interceptor); // so the caller can customize it }