forked from MapComplete/MapComplete
Fix download function
This commit is contained in:
parent
379bd43ab8
commit
fb460e2850
1 changed files with 2 additions and 2 deletions
|
@ -957,7 +957,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
||||||
|
|
||||||
let result = undefined
|
let result = undefined
|
||||||
for (let i = 0; i < maxAttempts; i++) {
|
for (let i = 0; i < maxAttempts; i++) {
|
||||||
result = await Utils.downloadAdvanced(url, headers, method, content)
|
result = await Utils.downloadAdvancedTryOnce(url, headers, method, content)
|
||||||
if(!result["error"] ){
|
if(!result["error"] ){
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
@ -971,7 +971,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
||||||
/**
|
/**
|
||||||
* Download function which also indicates advanced options, such as redirects
|
* Download function which also indicates advanced options, such as redirects
|
||||||
*/
|
*/
|
||||||
public static downloadAdvancedTryOnce(
|
private static downloadAdvancedTryOnce(
|
||||||
url: string,
|
url: string,
|
||||||
headers?: Record<string, string>,
|
headers?: Record<string, string>,
|
||||||
method: "POST" | "GET" | "PUT" | "UPDATE" | "DELETE" | "OPTIONS" = "GET",
|
method: "POST" | "GET" | "PUT" | "UPDATE" | "DELETE" | "OPTIONS" = "GET",
|
||||||
|
|
Loading…
Add table
Reference in a new issue