Parallel requests
unknown
javascript
3 years ago
680 B
18
Indexable
/**
* Makes parallel HTTP requests to the given array of URLs, with a constraint on the number
* of simultaneous requests allowed. Once all requests are completed, calls the provided
* callback function with an array of text responses in the same order as the input URLs.
*
* @param {string[]} urls - An array of URLs to make HTTP requests to.
* @param {number} limit - The maximum number of simultaneous HTTP requests allowed.
* @param {function(string[]): void} callback - The callback function to be called with an
* array of text responses once all requests are completed.
*/
function parallelHttpRequests(urls, limit, callback) {
// TODO: Implement the function
}
Editor is loading...