feat: promisify session.clearAuthCache() (#17259)

* feat: promisify session.clearAuthCache()

* remove unused callback runner helpers
This commit is contained in:
Shelley Vohr 2019-03-08 18:41:42 -08:00 committed by GitHub
parent 58a9a81895
commit 9ea6c01e02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 80 additions and 25 deletions

View file

@ -531,13 +531,21 @@ event. The [DownloadItem](download-item.md) will not have any `WebContents` asso
the initial state will be `interrupted`. The download will start only when the
`resume` API is called on the [DownloadItem](download-item.md).
#### `ses.clearAuthCache(options[, callback])`
#### `ses.clearAuthCache(options, callback)`
* `options` ([RemovePassword](structures/remove-password.md) | [RemoveClientCertificate](structures/remove-client-certificate.md))
* `callback` Function (optional) - Called when operation is done.
* `callback` Function - Called when operation is done.
Clears the sessions HTTP authentication cache.
**[Deprecated Soon](promisification.md)**
#### `ses.clearAuthCache(options)`
* `options` ([RemovePassword](structures/remove-password.md) | [RemoveClientCertificate](structures/remove-client-certificate.md))
Returns `Promise<void>` - resolves when the sessions HTTP authentication cache has been cleared.
#### `ses.setPreloads(preloads)`
* `preloads` String[] - An array of absolute path to preload scripts