From 2044208fd6fb7470524cb90b9ffa398e900fe3d5 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 10 Oct 2016 18:29:34 +0530 Subject: [PATCH] add docs --- docs/api/browser-window.md | 23 +++++++++++++++++++++++ docs/api/web-contents.md | 23 +++++++++++++++++++++++ docs/api/web-view-tag.md | 23 +++++++++++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 4a2c541a1..a8d43cd29 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -969,6 +969,29 @@ Same as `webContents.capturePage([rect, ]callback)`. * `httpReferrer` String (optional) - A HTTP Referrer url. * `userAgent` String (optional) - A user agent originating the request. * `extraHeaders` String (optional) - Extra headers separated by "\n" + * `postData` Array (optional) - An array of `upload` objects which + provides the request body for `POST` navigation. + +* `upload` Object + * `type` String - `data`, `file`, `filsSystem`, `blob`. + +If `type` is `data` then `upload` object must contain: + * `bytes` Buffer - Raw data to be uploaded. + +If `type` is `file` then `upload` object must contain: + * `filePath` String - Path of file to be uploaded. + * `offset` Integer + * `length` Integer + * `modificationTime` Double + +If `type` is `fileSystem` then `upload` object must contain: + * `filsSystemURL` String - FileSystem url to read data for upload. + * `offset` Integer + * `length` Integer + * `modificationTime` Double + +If `type` is `blob` then `upload` object must contain: + * `blobUUID` String - UUID of blob data to upload. Same as `webContents.loadURL(url[, options])`. diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 249188eac..d122587cc 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -490,6 +490,29 @@ win.loadURL('http://github.com') * `httpReferrer` String - A HTTP Referrer url. * `userAgent` String - A user agent originating the request. * `extraHeaders` String - Extra headers separated by "\n" + * `postData` Array - An array of `upload` objects which + provides the request body for `POST` navigation. + +* `upload` Object + * `type` String - `data`, `file`, `filsSystem`, `blob`. + +If `type` is `data` then `upload` object must contain: + * `bytes` Buffer - Raw data to be uploaded. + +If `type` is `file` then `upload` object must contain: + * `filePath` String - Path of file to be uploaded. + * `offset` Integer + * `length` Integer + * `modificationTime` Double + +If `type` is `fileSystem` then `upload` object must contain: + * `filsSystemURL` String - FileSystem url to read data for upload. + * `offset` Integer + * `length` Integer + * `modificationTime` Double + +If `type` is `blob` then `upload` object must contain: + * `blobUUID` String - UUID of blob data to upload. Loads the `url` in the window. The `url` must contain the protocol prefix, e.g. the `http://` or `file://`. If the load should bypass http cache then diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index 0c8c1bb94..f9e47f0c3 100644 --- a/docs/api/web-view-tag.md +++ b/docs/api/web-view-tag.md @@ -265,6 +265,29 @@ webview.addEventListener('dom-ready', () => { * `httpReferrer` String - A HTTP Referrer url. * `userAgent` String - A user agent originating the request. * `extraHeaders` String - Extra headers separated by "\n" + * `postData` Array - An array of `upload` objects which + provides the request body for `POST` navigation. + +* `upload` Object + * `type` String - `data`, `file`, `filsSystem`, `blob`. + +If `type` is `data` then `upload` object must contain: + * `bytes` Buffer - Raw data to be uploaded. + +If `type` is `file` then `upload` object must contain: + * `filePath` String - Path of file to be uploaded. + * `offset` Integer + * `length` Integer + * `modificationTime` Double + +If `type` is `fileSystem` then `upload` object must contain: + * `filsSystemURL` String - FileSystem url to read data for upload. + * `offset` Integer + * `length` Integer + * `modificationTime` Double + +If `type` is `blob` then `upload` object must contain: + * `blobUUID` String - UUID of blob data to upload. Loads the `url` in the webview, the `url` must contain the protocol prefix, e.g. the `http://` or `file://`. -- 2.34.1