A 307 redirect is an HTTP/1.1 status code for temporary redirects that strictly preserves the original request method. If a POST request receives a 307 response, the browser must resend the POST request to the new URL, unlike a 302 which may convert the request to GET. This method preservation makes 307 essential for API endpoints and form submissions.
The 307 status code was introduced to resolve ambiguity in the 302 specification. While 302 was defined as a temporary redirect, many browsers changed POST requests to GET when following a 302 redirect. The 307 code explicitly requires that the request method remain unchanged, providing predictable behavior for developers. HTTP specification books on Amazon cover these distinctions.
In URL shortening, 307 redirects are less common than 301 or 302 because most short URL clicks are GET requests. However, 307 becomes relevant when short URLs are used in API contexts or when the shortening service needs to redirect POST requests without altering the method.
The practical difference between 302 and 307 is primarily relevant for non-GET requests. For standard browser navigation via link clicks, both behave identically. The choice matters when building APIs or handling form submissions through redirect chains. API design books on Amazon discuss these patterns.