Allow setting the user agent for HTTP requests
See original GitHub issueIt should be possible to change the User-Agent
HTTP header that is included in every WebView and XHR request.
Proposed API: tabris.app.set('userAgent', 'Mozilla/5.0 ...')
Issue Analytics
- State:
- Created 7 years ago
- Comments:23 (18 by maintainers)
Top Results From Across the Web
How can I set the user-agent in the http header - Stack Overflow
User -agent represent your browser like Firefox or Chrome. Use the UserAgent property on HttpWebRequest by casting it to a HttpWebRequest
Read more >User-Agent - HTTP - MDN Web Docs - Mozilla
The User-Agent request header is a characteristic string that lets servers and network peers identify the application, operating system, vendor ...
Read more >HTTP headers | User-Agent - GeeksforGeeks
The HTTP headers User-Agent is a request header that allows a characteristic string that allows network protocol peers to identify the ...
Read more >Set a custom user agent | New Relic Documentation
To set a custom user agent, include an agent string in the HTTP header User-Agent. ... For the integration name, use a string...
Read more >How to Change User-Agents in Chrome, Edge, Safari & Firefox
A user-agent is an HTTP request header string identifying browsers, applications, or operating systems that connect to the server.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
okhttp
also supports custom headers, so add images to the list. One possibility would be to set the user-agent at the app level so it trickles down to all types of requests, and possibly default from the package name.Cordova also has the
AppendUserAgent
andOverrideUserAgent
preferences. Spoiler alert: These are not compatible with Tabris.js 1.x or 2.x. Using these Cordova build properties would be less flexible than being able to modify the user agent at runtime. I can’t think of a situation where it would be necessary to do so, but would rather see these defined on theapp
object as Cordova is pretty much only used for building and not really defining the capabilities of the built app.