Skip to content
Shiny.NET
Commercial SupportGuaranteed response times on Shiny bug fixes, straight from the maintainers. Plans from US$1,500 a year.See the plans

HTTP Transfers

GitHub GitHub stars for shinyorg/shiny
Downloads NuGet downloads for Shiny.Net.Http
Operating Systems
Android
iOS
tvOS
Windows
macOS
Linux
Web

Shiny HTTP Transfers enables background uploads and downloads that continue even when your app is suspended. On iOS, transfers are managed by the OS via NSURLSession background sessions and resume after app restarts. On Android, Windows, Linux, macOS, and plain .NET hosts a managed HttpClient loop drives transfers and supports resumable downloads via HTTP Range requests (on Android the loop runs inside a foreground service). On Blazor WebAssembly, transfers are queued to IndexedDB and drained by a Service Worker via the Background Sync API.

  • Background uploads and downloads
  • Multipart and raw upload support
  • Progress tracking with speed and ETA
  • Automatic resume after app restart
  • Resumable downloads on Android, Windows, Linux, macOS, and plain .NET via HTTP Range requests
  • Resumable uploads via the tus protocol on iOS, Android, Windows, Linux, macOS, and plain .NET
  • Metered/unmetered network control
  • Managed transfer list for UI binding
  • Cross-platform: iOS, Android, Windows, Linux, macOS, Blazor WebAssembly
Platform Package Backing
iOS Shiny.Net.Http NSURLSession background session
tvOS Shiny.Net.Http NSURLSession background session — same as iOS
Android Shiny.Net.Http Foreground service hosting a managed HttpClient + IConnectivity loop; resumable downloads via HTTP Range
Windows Shiny.Net.Http Managed HttpClient + IConnectivity loop; resumable downloads via HTTP Range
Linux / macOS / Plain .NET Shiny.Net.Http Managed HttpClient + IConnectivity loop; resumable downloads via HTTP Range
Blazor WebAssembly Shiny.Net.Http Service Worker Background Sync + IndexedDB; downloads not resumable
Changed files
  • MyApp/
Delegates/MyHttpTransferDelegate.cs
MyHttpTransferDelegate.cs
1using System.Threading.Tasks;2using Shiny.Net.Http;3​4namespace MyApp.Delegates;5​6public partial class MyHttpTransferDelegate : IHttpTransferDelegate7{8    public MyHttpTransferDelegate() 9    {10    }11​12    public Task OnCompleted(HttpTransferRequest request)13    {14        return Task.CompletedTask;15    }16​17    public Task OnError(HttpTransferRequest request, int statusCode, Exception ex)18    {19        return Task.CompletedTask;20    }21}22​23#if ANDROID24public partial class MyHttpTransferDelegate : IAndroidForegroundServiceDelegate25{26    public void Configure(AndroidX.Core.App.NotificationCompat.Builder builder)27    {28        builder29            .SetContentTitle("Your App")30            .SetContentText("Sending Transfers in the background");31    }32}33#endif

Implement IHttpTransferDelegate to handle transfer completion and errors in the background.

public partial class MyTransferDelegate : IHttpTransferDelegate
{
readonly ILogger<MyTransferDelegate> logger;
public MyTransferDelegate(ILogger<MyTransferDelegate> logger)
{
this.logger = logger;
}
public Task OnCompleted(HttpTransferRequest request)
{
this.logger.LogInformation("Transfer completed: {Id}", request.Identifier);
return Task.CompletedTask;
}
public Task OnError(HttpTransferRequest request, int statusCode, Exception ex)
{
this.logger.LogError(ex, "Transfer failed: {Id}, Status: {Status}", request.Identifier, statusCode);
return Task.CompletedTask;
}
}

On Android, background transfers run as a foreground service. Customize the notification:

#if ANDROID
public partial class MyTransferDelegate : IAndroidForegroundServiceDelegate
{
public void Configure(AndroidX.Core.App.NotificationCompat.Builder builder)
{
builder
.SetContentTitle("My App")
.SetContentText("Transferring files...")
.SetSmallIcon(Resource.Mipmap.appicon);
}
}
#endif
// iOS / Android / Windows (platform-aware: native sessions where available)
services.AddHttpTransfers<MyTransferDelegate>();
// Linux / macOS / plain .NET (managed HttpClient loop)
services.AddHttpClientTransfers<MyTransferDelegate>();
// Blazor WebAssembly (same Shiny.Net.Http package - net10.0 build)
services.AddBlazorHttpTransfers<MyTransferDelegate>(opts =>
{
// Optional — defaults to the bundled Shiny service worker
opts.ServiceWorkerPath = "./_content/Shiny.Net.Http/http-transfer-sw.js";
});

On Blazor, ship the bundled SW at the configured path, or import its handlers from your own service worker:

my-sw.js
importScripts('./_content/Shiny.Net.Http/http-transfer-sw.js');
claude plugin marketplace add shinyorg/skills
claude plugin install shiny@shiny

One plugin installs all 48 Shiny skills. Your agent loads only the skill relevant to what you're building, so there's no cost to having them all available.

copilot plugin marketplace add https://github.com/shinyorg/skills
copilot plugin install shiny@shiny

One plugin installs all 48 Shiny skills. Your agent loads only the skill relevant to what you're building, so there's no cost to having them all available.

View shiny-http-transfers Skill