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:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user