diff --git a/docs/api/protocol.md b/docs/api/protocol.md index d8e4f611a8..215fbe6673 100644 --- a/docs/api/protocol.md +++ b/docs/api/protocol.md @@ -229,9 +229,7 @@ should be called with either a `String` or an object that has the `data`, * `url` String * `method` String (optional) * `session` Object (optional) - * `uploadData` Object (optional) - * `contentType` String - MIME type of the content. - * `data` String - Content to be sent. + * `uploadData` [ProtocolResponseUploadData](structures/protocol-response-upload-data.md) (optional) * `completion` Function (optional) * `error` Error diff --git a/docs/api/structures/protocol-response-upload-data.md b/docs/api/structures/protocol-response-upload-data.md new file mode 100644 index 0000000000..bcb70da071 --- /dev/null +++ b/docs/api/structures/protocol-response-upload-data.md @@ -0,0 +1,4 @@ +# ProtocolResponseUploadData Object + +* `contentType` String - MIME type of the content. +* `data` String - Content to be sent. diff --git a/docs/api/structures/protocol-response.md b/docs/api/structures/protocol-response.md index d3b9c99abf..0d139ed4f8 100644 --- a/docs/api/structures/protocol-response.md +++ b/docs/api/structures/protocol-response.md @@ -28,9 +28,7 @@ * `session` Session (optional) - The session used for requesting URL, by default 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. -* `uploadData` Object (optional) - The data used as upload data. This is only +* `uploadData` ProtocolResponseUploadData (optional) - The data used as upload data. This is only used for URL responses when `method` is `"POST"`. - * `contentType` String - MIME type of the content. - * `data` String - Content to be sent. [net-error]: https://code.google.com/p/chromium/codesearch#chromium/src/net/base/net_error_list.h diff --git a/docs/api/structures/upload-data.md b/docs/api/structures/upload-data.md index ba719af667..bcbed755b2 100644 --- a/docs/api/structures/upload-data.md +++ b/docs/api/structures/upload-data.md @@ -1,6 +1,5 @@ # UploadData Object -* `contentType` String (optional) - Content type of the content to be sent. * `bytes` Buffer - Content being sent. * `file` String (optional) - Path of file being uploaded. * `blobUUID` String (optional) - UUID of blob data. Use [ses.getBlobData](../session.md#sesgetblobdataidentifier) method diff --git a/filenames.auto.gni b/filenames.auto.gni index 9139ef1054..dc6bc77772 100644 --- a/filenames.auto.gni +++ b/filenames.auto.gni @@ -95,6 +95,7 @@ auto_filenames = { "docs/api/structures/process-metric.md", "docs/api/structures/product.md", "docs/api/structures/protocol-request.md", + "docs/api/structures/protocol-response-upload-data.md", "docs/api/structures/protocol-response.md", "docs/api/structures/rectangle.md", "docs/api/structures/referrer.md",