Actions
Actions copied to clipboard
Action proposal: Get Contents (of Web Page) With Headers
Description
Right now, the provided "Get contents of" action in Shortcuts doesn't follow redirects or even allow to access the response headers. Right now, you can only get headers from a HEAD request and not from a regular GET/POST request.
I have a very specific use-case where I need to know where the page is redirecting to (or really just follow the redirect), but being able to use the response HEADERs would be more useful in general.
It sounds like a bug that the built-in action does not follow redirects. You should definitely send feedback to Apple about that.
As for the proposed action. It sounds ok. I think the action should follow redirects by default, but have an option to opt out of it.
It will be some months before I can get to this though. Apple is changing the way to make shortcut actions in iOS 16, and I don't want to make more actions using the old way.
@sindresorhus not only does it not follow the redirect but it also has no timeout. Because of this, many shortcuts do not work normally, for example https://github.com/Yue-Yang/ChatGPT-Siri
apparently chatgpt has a long timeout even in chatgpt3.5-turbo
Here's more people suffer because of this: https://www.reddit.com/r/shortcuts/comments/dgpors/how_to_deal_with_a_failed_get_request_because_api/ https://www.reddit.com/r/shortcuts/comments/qy097y/get_contents_of_url_fails_to_connect/ https://www.reddit.com/r/shortcuts/comments/11zigj9/handling_time_out_and_api_errors_using/ https://www.reddit.com/r/shortcuts/comments/q6bca9/network_timeout/
"Get Contents of Url" action does not working properly, adding this to the app will help us a lot.