add docs
This commit is contained in:
		
					parent
					
						
							
								86961d0f44
							
						
					
				
			
			
				commit
				
					
						d944219b28
					
				
			
		
					 2 changed files with 39 additions and 0 deletions
				
			
		|  | @ -146,3 +146,23 @@ header. | ||||||
| #### `downloadItem.getState()` | #### `downloadItem.getState()` | ||||||
| 
 | 
 | ||||||
| Returns `String` - The current state.  Can be `progressing`, `completed`, `cancelled` or `interrupted`. | Returns `String` - The current state.  Can be `progressing`, `completed`, `cancelled` or `interrupted`. | ||||||
|  | 
 | ||||||
|  | **Note:** The following methods are useful specifically to resume a | ||||||
|  | `cancelled` item when session is restarted. | ||||||
|  | 
 | ||||||
|  | #### `downloadItem.getURLChain()` | ||||||
|  | 
 | ||||||
|  | Returns `String[]` - The complete url chain of the item including any redirects. | ||||||
|  | 
 | ||||||
|  | #### `downloadItem.getLastModifiedTime()` | ||||||
|  | 
 | ||||||
|  | Returns `String` - Last-Modified header value. | ||||||
|  | 
 | ||||||
|  | #### `downloadItem.getETag()` | ||||||
|  | 
 | ||||||
|  | Returns `String` - ETag header value. | ||||||
|  | 
 | ||||||
|  | #### `downloadItem.getStartTime()` | ||||||
|  | 
 | ||||||
|  | Returns `Double` - Number of seconds since the UNIX epoch when the download was | ||||||
|  | started. | ||||||
|  |  | ||||||
|  | @ -344,6 +344,25 @@ Returns `String` - The user agent for this session. | ||||||
| 
 | 
 | ||||||
| Returns `Blob` - The blob data associated with the `identifier`. | Returns `Blob` - The blob data associated with the `identifier`. | ||||||
| 
 | 
 | ||||||
|  | #### `ses.createInterruptedDownload(options)` | ||||||
|  | 
 | ||||||
|  | * `options` Object | ||||||
|  |   * `path` String - Absolute path of the download. | ||||||
|  |   * `urlChain` String[] - Complete URL chain for the download. | ||||||
|  |   * `mimeType` String (optional) | ||||||
|  |   * `offset` Integer - Start range for the download. | ||||||
|  |   * `length` Integer - Total length of the download. | ||||||
|  |   * `lastModified` String - Last-Modified header value. | ||||||
|  |   * `eTag` String - ETag header value. | ||||||
|  |   * `startTime` Double (optional) - Time when download was started in | ||||||
|  |     number of seconds since UNIX epoch. | ||||||
|  | 
 | ||||||
|  | Allows resuming `cancelled` or `interrupted` downloads from previous `Session`. | ||||||
|  | The API will generate a [DownloadItem](download-item.md) that can be accessed with the [will-download](#event-will-download) | ||||||
|  | event. The [DownloadItem](download-item.md) will not have any `WebContents` associated with it and | ||||||
|  | the initial state will be `interrupted`. The download will start only when the | ||||||
|  | `resume` API is called on the [DownloadItem](download-item.md). | ||||||
|  | 
 | ||||||
| ### Instance Properties | ### Instance Properties | ||||||
| 
 | 
 | ||||||
| The following properties are available on instances of `Session`: | The following properties are available on instances of `Session`: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 deepak1556
				deepak1556