1fetch("http://example.com/", {
2 method: 'POST',
3 mode: 'cors',
4 body: formData
5})
6.then(dataWrappedByPromise => dataWrappedByPromise.text())
7.then(data => {
8 //Redirect is the URL inside the text of the response promise
9 window.location.replace(data);
10})