mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
test: move protocol specs to main process (#18923)
This commit is contained in:
@@ -131,11 +131,12 @@ protocol.registerSchemesAsPrivileged([
|
||||
* `handler` Function
|
||||
* `request` Object
|
||||
* `url` String
|
||||
* `headers` Record<String, String>
|
||||
* `referrer` String
|
||||
* `method` String
|
||||
* `uploadData` [UploadData[]](structures/upload-data.md)
|
||||
* `callback` Function
|
||||
* `filePath` String (optional)
|
||||
* `filePath` String | [FilePathWithHeaders](structures/file-path-with-headers.md) (optional)
|
||||
* `completion` Function (optional)
|
||||
* `error` Error
|
||||
|
||||
@@ -165,6 +166,7 @@ than protocols that follow the "generic URI syntax" like `file:`.
|
||||
* `handler` Function
|
||||
* `request` Object
|
||||
* `url` String
|
||||
* `headers` Record<String, String>
|
||||
* `referrer` String
|
||||
* `method` String
|
||||
* `uploadData` [UploadData[]](structures/upload-data.md)
|
||||
@@ -197,11 +199,12 @@ protocol.registerBufferProtocol('atom', (request, callback) => {
|
||||
* `handler` Function
|
||||
* `request` Object
|
||||
* `url` String
|
||||
* `headers` Record<String, String>
|
||||
* `referrer` String
|
||||
* `method` String
|
||||
* `uploadData` [UploadData[]](structures/upload-data.md)
|
||||
* `callback` Function
|
||||
* `data` String (optional)
|
||||
* `data` (String | [StringProtocolResponse](structures/string-protocol-response.md)) (optional)
|
||||
* `completion` Function (optional)
|
||||
* `error` Error
|
||||
|
||||
@@ -217,14 +220,14 @@ should be called with either a `String` or an object that has the `data`,
|
||||
* `handler` Function
|
||||
* `request` Object
|
||||
* `url` String
|
||||
* `headers` Object
|
||||
* `headers` Record<String, String>
|
||||
* `referrer` String
|
||||
* `method` String
|
||||
* `uploadData` [UploadData[]](structures/upload-data.md)
|
||||
* `callback` Function
|
||||
* `redirectRequest` Object
|
||||
* `url` String
|
||||
* `method` String
|
||||
* `method` String (optional)
|
||||
* `session` Object (optional)
|
||||
* `uploadData` Object (optional)
|
||||
* `contentType` String - MIME type of the content.
|
||||
@@ -249,7 +252,7 @@ For POST requests the `uploadData` object must be provided.
|
||||
* `handler` Function
|
||||
* `request` Object
|
||||
* `url` String
|
||||
* `headers` Object
|
||||
* `headers` Record<String, String>
|
||||
* `referrer` String
|
||||
* `method` String
|
||||
* `uploadData` [UploadData[]](structures/upload-data.md)
|
||||
@@ -325,6 +328,7 @@ already a handler for `scheme`.
|
||||
* `handler` Function
|
||||
* `request` Object
|
||||
* `url` String
|
||||
* `headers` Record<String, String>
|
||||
* `referrer` String
|
||||
* `method` String
|
||||
* `uploadData` [UploadData[]](structures/upload-data.md)
|
||||
@@ -342,11 +346,12 @@ which sends a file as a response.
|
||||
* `handler` Function
|
||||
* `request` Object
|
||||
* `url` String
|
||||
* `headers` Record<String, String>
|
||||
* `referrer` String
|
||||
* `method` String
|
||||
* `uploadData` [UploadData[]](structures/upload-data.md)
|
||||
* `callback` Function
|
||||
* `data` String (optional)
|
||||
* `data` (String | [StringProtocolResponse](structures/string-protocol-response.md)) (optional)
|
||||
* `completion` Function (optional)
|
||||
* `error` Error
|
||||
|
||||
@@ -359,6 +364,7 @@ which sends a `String` as a response.
|
||||
* `handler` Function
|
||||
* `request` Object
|
||||
* `url` String
|
||||
* `headers` Record<String, String>
|
||||
* `referrer` String
|
||||
* `method` String
|
||||
* `uploadData` [UploadData[]](structures/upload-data.md)
|
||||
@@ -376,15 +382,15 @@ which sends a `Buffer` as a response.
|
||||
* `handler` Function
|
||||
* `request` Object
|
||||
* `url` String
|
||||
* `headers` Object
|
||||
* `headers` Record<String, String>
|
||||
* `referrer` String
|
||||
* `method` String
|
||||
* `uploadData` [UploadData[]](structures/upload-data.md)
|
||||
* `callback` Function
|
||||
* `redirectRequest` Object
|
||||
* `url` String
|
||||
* `method` String
|
||||
* `session` Object (optional)
|
||||
* `method` String (optional)
|
||||
* `session` Object | null (optional)
|
||||
* `uploadData` Object (optional)
|
||||
* `contentType` String - MIME type of the content.
|
||||
* `data` String - Content to be sent.
|
||||
@@ -400,7 +406,7 @@ which sends a new HTTP request as a response.
|
||||
* `handler` Function
|
||||
* `request` Object
|
||||
* `url` String
|
||||
* `headers` Object
|
||||
* `headers` Record<String, String>
|
||||
* `referrer` String
|
||||
* `method` String
|
||||
* `uploadData` [UploadData[]](structures/upload-data.md)
|
||||
|
||||
Reference in New Issue
Block a user