Task: Implement a Recursive Promise-based Redirect Resolver in JavaScript
Task: Implement a Recursive Promise-based Redirect Resolver in JavaScript: a task in Terminal-Lego-15k (Harbor dataset). You need to implement a JavaScript function called getRedirectUrl that recursively follows HTTP redirects and resolves with the final destination URL. The function must return a…
The task
You need to implement a JavaScript function called `getRedirectUrl` that recursively follows HTTP redirects and resolves with the final destination URL. The function must return a Promise that correctly chains recursive calls when redirects are encountered.
Part of PrimeIntellect/Terminal-Lego-15k.