Created
October 18, 2022 12:05
-
-
Save Stephen2/47e440c80d2c25c368a41b0cad6aa39f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios"; | |
const url = "https://{domain}.jotform.com/API/pdf-converter/{form}/fill-pdf?apikey={apiKey}&download=1&submissionID={submissionId}"; | |
const main = async() => { | |
await Promise.all( | |
Array(50).fill().map(async (_, i) => { | |
try { | |
await axios.get(url); | |
console.log(`Got ${i}`); | |
} catch (err) { | |
console.log("ERR: ", { | |
status: err.response.status, | |
data: err.response.data, | |
}); | |
} | |
}) | |
); | |
} | |
main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment