Download Class

A response handled as a download (https://html.spec.whatwg.org/multipage/links.html#downloading-resources), see BrowsingContextOptions.DownloadStarted: the response of a navigation whose Content-Disposition is attachment, or the resource of a hyperlink with a download attribute.

public sealed class Download

Properties

NameDescription
FilenameGets the value of the download attribute of the hyperlink (possibly empty), or null for the response of a navigation. The Content-Disposition header of Download.Resource may suggest another filename.
ResourceGets the response. The rest of a body that arrives over time (DocumentResource.RemainingContentBytes) is not read by the library: the callback that saves the download reads it, or disposes its enumerator to cancel it.
UrlGets the URL of the response (after the redirects).

Filename

Download.cs

Gets the value of the download attribute of the hyperlink (possibly empty), or null for the response of a navigation. The Content-Disposition header of Download.Resource may suggest another filename.

public string? Filename { get; }

Property value

string?

Resource

Download.cs

Gets the response. The rest of a body that arrives over time (DocumentResource.RemainingContentBytes) is not read by the library: the callback that saves the download reads it, or disposes its enumerator to cancel it.

public DocumentResource Resource { get; }

Property value

DocumentResource

Gets the URL of the response (after the redirects).

public string Url { get; }

Property value

string