title: Electron - Retrieving HTTP response headers from the BrowserWindow's loadUrl()
body: <p>I'm working on a test project hosted on a pc included in a SSO environment.
  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.
  I studied the doc and it seems there isn't a callback function for the <code>loadUrl()</code> method nor an option I can use to get those headers.</p>
  
  <p>link for the reference</p>
  
  <p><a href="https://electronjs.org/docs/api/browser-window" rel="nofollow noreferrer">https://electronjs.org/docs/api/browser-window</a></p>
  
  <p><code>loadUrl</code> has a second optional parameter that is defined as an Electron.loadURLOption but it doesn't seem to be helpful</p>
  
  <pre><code>interface LoadURLOptions {
      /**
       * An HTTP Referrer url.
       */
      httpReferrer?: (string) | (Referrer);
      /**
       * A user agent originating the request.
       */
      userAgent?: string;
      /**
       * Extra headers separated by "\n"
       */
      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;
  }
  </code></pre>
  
  <p>I'd appreciate any kind of help, thanks</p>