Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 576 Bytes

File metadata and controls

18 lines (14 loc) · 576 Bytes

HttpFileRefresh

Fetches a resource periodically and writes to a file.

Travis

Simple example:

  services.AddHttpClient("client");
  
  services.Configure<FileRefreshServiceOptions>(options => {
    options.ClientName = "client";
    options.Interval = TimeSpan.FromMinutes(60);
    options.Uri = new Uri("https://httpbin.org/get");
    options.Path = "whatever.json";
  });
  services.AddSingleton<IHostedService, FileRefreshService>();