What to download and how.

interface _DownloadOptions {
    allowHttpErrors?: boolean;
    body?: string;
    conflictAction?: FilenameConflictAction;
    cookieStoreId?: string;
    filename?: string;
    headers?: _DownloadOptionsHeaders[];
    incognito?: boolean;
    method?: _DownloadOptionsMethod;
    saveAs?: boolean;
    url: string;
}
Index
allowHttpErrors?: boolean

When this flag is set to true, then the browser will allow downloads to proceed after encountering HTTP errors such as 404 Not Found.

body?: string

Post body.

conflictAction?: FilenameConflictAction
cookieStoreId?: string

The cookie store ID of the contextual identity; requires "cookies" permission.

filename?: string

A file path relative to the Downloads directory to contain the downloaded file.

Extra HTTP headers to send with the request if the URL uses the HTTP[s] protocol. Each header is represented as a dictionary containing the keys name and either value or binaryValue, restricted to those allowed by XMLHttpRequest.

incognito?: boolean

Whether to associate the download with a private browsing session.

The HTTP method to use if the URL uses the HTTP[S] protocol.

saveAs?: boolean

Use a file-chooser to allow the user to select a filename. If the option is not specified, the file chooser will be shown only if the Firefox "Always ask you where to save files" option is enabled (i.e. the pref browser.download.useDownloadDir is set to false).

url: string

The URL to download.