feat: implement net.fetch (#36733)

This commit is contained in:
Jeremy Rose 2023-02-20 12:57:38 -08:00 committed by GitHub
parent 63f94f2359
commit 872d1fe05a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 969 additions and 539 deletions

View file

@ -1,4 +1,9 @@
const { fromPartition } = process._linkedBinding('electron_browser_session');
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);
};
export default {
fromPartition,