Each header is represented as a dictionary object containing the keys name and either value or binaryValue. headers Optional If the URL uses the HTTP or HTTPS protocols, an array of objects representing additional HTTP headers to send with the request.
If omitted, this value will default to the filename already given to the download file, and a location immediately inside the downloads directory. Absolute paths, empty paths, path components that start and/or end with a dot (.), and paths containing back-references (. Use requires the "cookies" API permission.įilename Optional A string representing a file path relative to the default downloads directory - this provides the location where you want the file to be saved, and what filename you want to use. If omitted, the default cookie store is used. cookieStoreId Optional The cookie store ID of the contextual identity the download is associated with. conflictAction Optional A string representing the action you want taken if there is a filename conflict, as defined in the downloads.FilenameConflictAction type (defaults to "uniquify" when it is not specified). However, if the download fails due to file-related, network-related, user-related, or other error, that error is reported.īody Optional A string representing the post body of the request. true, the download continues when an HTTP error is encountered and the HTTP server error is not reported.false, the download is canceled when it encounters an HTTP error.Using this flag, for example, enables the download of server error pages. It can contain the following properties: allowHttpErrors Optional A boolean flag that enables downloads to continue even if they encounter HTTP errors. An object specifying what file you wish to download, and any other preferences you wish to set concerning the download.