Skip to content

Instantly share code, notes, and snippets.

@Stephen2
Created October 18, 2022 12:05
Show Gist options
  • Save Stephen2/47e440c80d2c25c368a41b0cad6aa39f to your computer and use it in GitHub Desktop.
Save Stephen2/47e440c80d2c25c368a41b0cad6aa39f to your computer and use it in GitHub Desktop.

Revisions

  1. Stephen2 created this gist Oct 18, 2022.
    21 changes: 21 additions & 0 deletions jotform-bug.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    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();