PostBody Object
-
data(UploadRawData | UploadFile)[] - The post data to be sent to the new window. -
contentTypeString - Thecontent-typeheader used for the data. One ofapplication/x-www-form-urlencodedormultipart/form-data. Corresponds to theenctypeattribute of the submitted HTML form. -
boundaryString (optional) - The boundary used to separate multiple parts of the message. Only valid whencontentTypeismultipart/form-data.
Note that keys starting with -- are not currently supported. For example, this will errantly submit as multipart/form-data when nativeWindowOpen is set to false in webPreferences:
<form
target="_blank"
method="POST"
enctype="application/x-www-form-urlencoded"
action="https://postman-echo.com/post"
>
<inputtype="text"name="--theKey">
<inputtype="submit">
</form>
© GitHub Inc.
Licensed under the MIT license.
https://www.electronjs.org/docs/latest/api/structures/post-body