How to use the querystring-es3.stringify function in querystring-es3

To help you get started, we’ve selected a few querystring-es3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github buttercup / buttercup-mobile / source / library / PiwikTracker.js View on Github external
function sendPayload(fetchFn, trackerURL, payload) {
    const url = `${trackerURL}?${querystring.stringify(payload)}`;
    if (isTest() === true) {
        return Promise.resolve();
    }
    return fetchFn(url).then(response => {
        if (/^(200|30[12478])$/.test(response.status) !== true) {
            throw new Error(`Tracking failed: Bad response code: ${response.status} ${response.statusText}`);
        }
    });
}

querystring-es3

Node's querystring module for all engines. (ES3 compat fork)

MIT
Latest version published 10 years ago

Package Health Score

65 / 100
Full package analysis