2023-02-20 20:57:38 +00:00
|
|
|
import { fetchWithSession } from '@electron/internal/browser/api/net-fetch';
|
|
|
|
const { fromPartition, Session } = process._linkedBinding('electron_browser_session');
|
|
|
|
|
|
|
|
Session.prototype.fetch = function (input: RequestInfo, init?: RequestInit) {
|
|
|
|
return fetchWithSession(input, init, this);
|
|
|
|
};
|
2020-05-22 19:46:22 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
fromPartition,
|
|
|
|
get defaultSession () {
|
|
|
|
return fromPartition('');
|
|
|
|
}
|
|
|
|
};
|