/// <summary> /// Adds an BeforeRequest Event against this request. Note that you can add more than one event. Events from the Configuration are executed first. /// </summary> /// <param name="config"></param> /// <param name="beforeRequest"></param> /// <returns></returns> public static RestConfiguration BeforeRequest(this RestConfiguration config, BeforeRequestDelegate beforeRequest) { config.BeforeRequestEvent += beforeRequest; return(config); }
/// <summary> /// Adds an BeforeRequest Event against this request. Note that you can add more than one event. Events from the Configuration are executed first. /// </summary> /// <param name="request"></param> /// <param name="beforeRequest"></param> /// <returns></returns> public static RestRequest BeforeRequest(this RestRequest request, BeforeRequestDelegate beforeRequest) { request.BeforeRequestEvent += beforeRequest; return(request); }