I invite you to try it in your favorite browser interactively, then in ajax , then curl, then python requests, then wget, then whichever software and libraries are available to you.
It works. We’ve been doing it to redirect http to https for api servers that have clients written in C, PHP, .NET, JavaScript and more. Http 307 is well-defined and supported.