The case in hand is as follows:
Alternative solution i guess is for the api to return an object that the website can use to redirect.
Your kind suggestions and ideas
You should take a look at the HTTP/1.1 Status Code Definitions . Specifically section 10.3 "Redirection 3xx". It describes the available status codes, and you should be able to find a suitable one.
Example: 303 See Other
Your API would create a response with status code 303 and add a "Location" header that contains the address of the site you redirect to.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.