Setting the redirect policy Write a program that uses the HTTP Client API to automatically redirect if needed.