mirror of
https://github.com/tenrok/axios.git
synced 2026-06-05 16:42:32 +03:00
Preserve HTTP method when following redirect (#1758)
Resolves #1158 This modifies http.js to uppercase the HTTP method, similar to xhr.js, before passing the request off to the transport. This causes follow-redirects to preserve the HTTP method when automatically making a request to the next URL.
This commit is contained in:
committed by
Khaled Garbaya
parent
9005a54a8b
commit
21ae22dbd3
@@ -83,7 +83,7 @@ module.exports = function httpAdapter(config) {
|
||||
|
||||
var options = {
|
||||
path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''),
|
||||
method: config.method,
|
||||
method: config.method.toUpperCase(),
|
||||
headers: headers,
|
||||
agent: agent,
|
||||
auth: auth
|
||||
|
||||
Reference in New Issue
Block a user