I'm working on a test project hosted on a pc included in a SSO environment.
(我正在研究一个SSO环境中包含在PC上的测试项目。)
I'm actually pointing to a webpage hosted on a server inside this environment and I need to access the cookies (just got them) and the http headers of the request.(我实际上指向的是在此环境内的服务器上托管的网页,我需要访问cookie(仅获取它们)和请求的http标头。)
I studied the doc and it seems there isn't a callback function for the loadUrl()
method nor an option I can use to get those headers.(我研究了文档,似乎没有用于loadUrl()
方法的回调函数,也没有可以用来获取这些标头的选项。)
link for the reference
(参考链接)
https://electronjs.org/docs/api/browser-window
(https://electronjs.org/docs/api/browser-window)
loadUrl
has a second optional parameter that is defined as an Electron.loadURLOption but it doesn't seem to be helpful
(loadUrl
具有第二个可选参数,该参数定义为Electron.loadURLOption,但似乎没有帮助)
interface LoadURLOptions {
/**
* An HTTP Referrer url.
*/
httpReferrer?: (string) | (Referrer);
/**
* A user agent originating the request.
*/
userAgent?: string;
/**
* Extra headers separated by "
"
*/
extraHeaders?: string;
postData?: (UploadRawData[]) | (UploadFile[]) | (UploadBlob[]);
/**
* Base url (with trailing path separator) for files to be loaded by the data url.
* This is needed only if the specified url is a data url and needs to load other
* files.
*/
baseURLForDataURL?: string;
}
I'd appreciate any kind of help, thanks
(我将不胜感激,谢谢)
ask by sarbuLopex translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…