I have an API endpoint that expects a GET request.
On some scenarios, I want to be able to perform a redirect instead of responding with a result.
e.g., If you'll open the API endpoint URL in a browser, you'll be redirected to a specific page.
- I KNOW that I can use a controller for that instead of REST API, but this is the current situation & I need to solve it without changing the endpoint URL.
- I tried to use
Magento\Framework\Controller\ResultFactory& return a
TYPE_REDIRECTresponse from the API method, but it just returns an empty array & not redirecting.