Take the HttpContext as a param.

This delegates the responsibility of knowing about the HttpContext to the client code. The argument can initialized either in a DI container or in tha calling code as: new HttpContextWrapper(HttpContext.Current) as HttpContextBase