@@ -131,11 +131,12 @@ protocol.registerSchemesAsPrivileged([
131131* ` handler ` Function
132132 * ` request ` Object
133133 * ` url ` String
134+ * ` headers ` Record<String, String>
134135 * ` referrer ` String
135136 * ` method ` String
136137 * ` uploadData ` [ UploadData[ ]] ( structures/upload-data.md )
137138 * ` callback ` Function
138- * ` filePath ` String (optional)
139+ * ` filePath ` String | [ FilePathWithHeaders ] ( structures/file-path-with-headers.md ) (optional)
139140* ` completion ` Function (optional)
140141 * ` error ` Error
141142
@@ -165,6 +166,7 @@ than protocols that follow the "generic URI syntax" like `file:`.
165166* ` handler ` Function
166167 * ` request ` Object
167168 * ` url ` String
169+ * ` headers ` Record<String, String>
168170 * ` referrer ` String
169171 * ` method ` String
170172 * ` uploadData ` [ UploadData[ ]] ( structures/upload-data.md )
@@ -197,11 +199,12 @@ protocol.registerBufferProtocol('atom', (request, callback) => {
197199* ` handler ` Function
198200 * ` request ` Object
199201 * ` url ` String
202+ * ` headers ` Record<String, String>
200203 * ` referrer ` String
201204 * ` method ` String
202205 * ` uploadData ` [ UploadData[ ]] ( structures/upload-data.md )
203206 * ` callback ` Function
204- * ` data ` String (optional)
207+ * ` data ` ( String | [ StringProtocolResponse ] ( structures/string-protocol-response.md ) ) (optional)
205208* ` completion ` Function (optional)
206209 * ` error ` Error
207210
@@ -217,14 +220,14 @@ should be called with either a `String` or an object that has the `data`,
217220* ` handler ` Function
218221 * ` request ` Object
219222 * ` url ` String
220- * ` headers ` Object
223+ * ` headers ` Record<String, String>
221224 * ` referrer ` String
222225 * ` method ` String
223226 * ` uploadData ` [ UploadData[ ]] ( structures/upload-data.md )
224227 * ` callback ` Function
225228 * ` redirectRequest ` Object
226229 * ` url ` String
227- * ` method ` String
230+ * ` method ` String (optional)
228231 * ` session ` Object (optional)
229232 * ` uploadData ` Object (optional)
230233 * ` contentType ` String - MIME type of the content.
@@ -249,7 +252,7 @@ For POST requests the `uploadData` object must be provided.
249252* ` handler ` Function
250253 * ` request ` Object
251254 * ` url ` String
252- * ` headers ` Object
255+ * ` headers ` Record<String, String>
253256 * ` referrer ` String
254257 * ` method ` String
255258 * ` uploadData ` [ UploadData[ ]] ( structures/upload-data.md )
@@ -325,6 +328,7 @@ already a handler for `scheme`.
325328* ` handler ` Function
326329 * ` request ` Object
327330 * ` url ` String
331+ * ` headers ` Record<String, String>
328332 * ` referrer ` String
329333 * ` method ` String
330334 * ` uploadData ` [ UploadData[ ]] ( structures/upload-data.md )
@@ -342,11 +346,12 @@ which sends a file as a response.
342346* ` handler ` Function
343347 * ` request ` Object
344348 * ` url ` String
349+ * ` headers ` Record<String, String>
345350 * ` referrer ` String
346351 * ` method ` String
347352 * ` uploadData ` [ UploadData[ ]] ( structures/upload-data.md )
348353 * ` callback ` Function
349- * ` data ` String (optional)
354+ * ` data ` ( String | [ StringProtocolResponse ] ( structures/string-protocol-response.md ) ) (optional)
350355* ` completion ` Function (optional)
351356 * ` error ` Error
352357
@@ -359,6 +364,7 @@ which sends a `String` as a response.
359364* ` handler ` Function
360365 * ` request ` Object
361366 * ` url ` String
367+ * ` headers ` Record<String, String>
362368 * ` referrer ` String
363369 * ` method ` String
364370 * ` uploadData ` [ UploadData[ ]] ( structures/upload-data.md )
@@ -376,15 +382,15 @@ which sends a `Buffer` as a response.
376382* ` handler ` Function
377383 * ` request ` Object
378384 * ` url ` String
379- * ` headers ` Object
385+ * ` headers ` Record<String, String>
380386 * ` referrer ` String
381387 * ` method ` String
382388 * ` uploadData ` [ UploadData[ ]] ( structures/upload-data.md )
383389 * ` callback ` Function
384390 * ` redirectRequest ` Object
385391 * ` url ` String
386- * ` method ` String
387- * ` session ` Object (optional)
392+ * ` method ` String (optional)
393+ * ` session ` Object | null (optional)
388394 * ` uploadData ` Object (optional)
389395 * ` contentType ` String - MIME type of the content.
390396 * ` data ` String - Content to be sent.
@@ -400,7 +406,7 @@ which sends a new HTTP request as a response.
400406* ` handler ` Function
401407 * ` request ` Object
402408 * ` url ` String
403- * ` headers ` Object
409+ * ` headers ` Record<String, String>
404410 * ` referrer ` String
405411 * ` method ` String
406412 * ` uploadData ` [ UploadData[ ]] ( structures/upload-data.md )
0 commit comments