title: How to redirect user to a page after receiving the response from a fetch POST request?
body: <p>I am writing code for a web application that send a POST request to node.js server using fetch() api of javascript. On successful request server responds with  a redirection, this redirection url is received in the fetch() api response body. After this what should I do to redirect user to this URL from fetch function.</p>
  
  <pre><code>fetch("/events/registration", {
            method: "POST",
            redirect:"follow",
            headers: {
              "Accept": "application/json , text/plain ,*/*",
              "Content-type": "application/json"
            },
            body: JSON.stringify({
              name,
              email,
            })
          })
  .then((res)=&gt;res.json())
  .then((data)=&gt;{console.log(data);if(data.err)alert(data.err);Response.redirect()});
  </code></pre>
  
  <p>In response that i receive in fetch api I am getting <code>redirect:true , url: "LinkOfRedirection/redirect"</code>, now what should i do to redirect user from here to the LinkOfRedirection/redirect.</p>