Waboodoo / HTTP-Shortcuts

Android app to create home screen shortcuts that trigger arbitrary HTTP requests
https://http-shortcuts.rmy.ch
MIT License
1.17k stars 113 forks source link

Add an option to make the request present itself as a desktop browser #424

Closed HFPasfho closed 4 months ago

HFPasfho commented 5 months ago

Is your feature request related to a problem? Please describe.

The page I want to download information from returns a very limited range of data if we visit it from a mobile browser. Switching in the mobile browser options so that the browser pretends to be a desktop browser solves this problem and gives access to all the necessary information, but in this program there is no such option, so I always get incomplete data without the most important information.

Describe the solution you'd like

Option to make a particular request pretend to be a desktop browser.

Waboodoo commented 4 months ago

Hi, you should be able to already achieve this by using a custom User-Agent header. Just pick a user-agent of a typical desktop browser (e.g. "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0") add add an HTTP header User-Agent with this value to your shortcut. Or if you want to apply this to all of your shortcuts, you can globally change the user-agent from the Settings screen. Whether or not this works, and which user-agent works best, depends on the server implementation, so this might require some trial-and-error.