docs: deprecate setting ProtocolResponse.session to null (#46131)
* docs: deprecate setting ProtocolResponse.session to null * docs: mark null ProtocolResponse.session as deprecated in struct docs * Update docs/breaking-changes.md Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
This commit is contained in:
parent
4f4e23a3b3
commit
f7ba0d3b4b
2 changed files with 13 additions and 1 deletions
|
@ -28,6 +28,8 @@
|
||||||
* `session` Session (optional) - The session used for requesting URL, by default
|
* `session` Session (optional) - The session used for requesting URL, by default
|
||||||
the HTTP request will reuse the current session. Setting `session` to `null`
|
the HTTP request will reuse the current session. Setting `session` to `null`
|
||||||
would use a random independent session. This is only used for URL responses.
|
would use a random independent session. This is only used for URL responses.
|
||||||
|
**Deprecated:** Using `null` to create a random independent session is
|
||||||
|
deprecated and will be removed soon.
|
||||||
* `uploadData` [ProtocolResponseUploadData](protocol-response-upload-data.md) (optional) - The data used as upload data. This is only
|
* `uploadData` [ProtocolResponseUploadData](protocol-response-upload-data.md) (optional) - The data used as upload data. This is only
|
||||||
used for URL responses when `method` is `"POST"`.
|
used for URL responses when `method` is `"POST"`.
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,16 @@ When calling `Session.clearStorageData(options)`, the `options.quota` type
|
||||||
[removed](https://chromium-review.googlesource.com/c/chromium/src/+/6309405)
|
[removed](https://chromium-review.googlesource.com/c/chromium/src/+/6309405)
|
||||||
from upstream Chromium.
|
from upstream Chromium.
|
||||||
|
|
||||||
|
### Deprecated: `null` value for `session` property in `ProtocolResponse`
|
||||||
|
|
||||||
|
Previously, setting the ProtocolResponse.session property to `null`
|
||||||
|
Would create a random independent session. This is no longer supported.
|
||||||
|
|
||||||
|
Using single-purpose sessions here is discouraged due to overhead costs;
|
||||||
|
however, old code that needs to preserve this behavior can emulate it by
|
||||||
|
creating a random session with `session.fromPartition(some_random_string)`
|
||||||
|
and then using it in `ProtocolResponse.session`.
|
||||||
|
|
||||||
### Deprecated: `quota` property in `Session.clearStorageData(options)`
|
### Deprecated: `quota` property in `Session.clearStorageData(options)`
|
||||||
|
|
||||||
When calling `Session.clearStorageData(options)`, the `options.quota`
|
When calling `Session.clearStorageData(options)`, the `options.quota`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue