diff --git a/preload/src/api/fetch.js b/preload/src/api/fetch.js index 8f04ce2d..e70b545f 100644 --- a/preload/src/api/fetch.js +++ b/preload/src/api/fetch.js @@ -6,7 +6,7 @@ const redirectCodes = new Set([301, 302, 307, 308]); /** * @typedef {Object} FetchOptions - * @property {"GET" | "PUT" | "POST" | "DELETE"} [method] - Request method. + * @property {"GET" | "PUT" | "POST" | "DELETE" | "PATCH"} [method] - Request method. * @property {Record} [headers] - Request headers. * @property {"manual" | "follow"} [redirect] - Whether to follow redirects. * @property {number} [maxRedirects] - Maximum amount of redirects to be followed. diff --git a/renderer/src/modules/api/fetch.js b/renderer/src/modules/api/fetch.js index cbf7de25..02124ef3 100644 --- a/renderer/src/modules/api/fetch.js +++ b/renderer/src/modules/api/fetch.js @@ -1,6 +1,6 @@ import Remote from "../../polyfill/remote"; -const methods = new Set(["GET", "PUT", "POST", "DELETE"]); +const methods = new Set(["GET", "PUT", "POST", "DELETE", "PATCH"]); const bodylessStatusCodes = new Set([101, 204, 205, 304]); class FetchResponse extends Response { @@ -35,7 +35,7 @@ const convertSignal = signal => { /** * @typedef {Object} FetchOptions - * @property {"GET" | "PUT" | "POST" | "DELETE"} [method] - Request method. + * @property {"GET" | "PUT" | "POST" | "DELETE" | "PATCH"} [method] - Request method. * @property {Record} [headers] - Request headers. * @property {"manual" | "follow"} [redirect] - Whether to follow redirects. * @property {number} [maxRedirects] - Maximum amount of redirects to be followed.