2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-23 20:40:40 +03:00

fix(fetch): capitalize HTTP method names; (#6395)

This commit is contained in:
Dmitriy Mozgovoy
2024-05-18 18:01:01 +03:00
committed by GitHub
parent b9f4848f8c
commit ad3174a351
+2 -2
View File
@@ -122,7 +122,7 @@ export default isFetchSupported && (async (config) => {
let requestContentLength = await resolveBodyLength(headers, data); let requestContentLength = await resolveBodyLength(headers, data);
let _request = new Request(url, { let _request = new Request(url, {
method, method: 'POST',
body: data, body: data,
duplex: "half" duplex: "half"
}); });
@@ -146,7 +146,7 @@ export default isFetchSupported && (async (config) => {
request = new Request(url, { request = new Request(url, {
...fetchOptions, ...fetchOptions,
signal: composedSignal, signal: composedSignal,
method, method: method.toUpperCase(),
headers: headers.normalize().toJSON(), headers: headers.normalize().toJSON(),
body: data, body: data,
duplex: "half", duplex: "half",