Electron.js-从loadUrl方法访问发布数据

时间:2018-12-14 10:58:23

标签: javascript node.js electron

我正在构建一个加载不同本地页面的应用程序,文档说明我们可以使用以下POST数据加载URL:

win.loadURL('index.html', {
    postData: [{
    type: 'rawData',
    bytes: Buffer.from('hello=world')
  }],
  extraHeaders: 'Content-Type: application/x-www-form-urlencoded'
})

我的问题是如何在加载的页面(index.html)中访问POST变量(hello)?

0 个答案:

没有答案