Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我做了一个从网站下载图片的小应用程序。但是当我用正确的 url 打开 HttpURLConnection 时,它会打开这个网站的移动版本。请问怎样才能打开正版?感谢您的回复。
您可以User-Agent使用以下方式进行更改:
User-Agent
//HttpURLConnection connection; connection.setRequestProperty("User-Agent","YOUR-USER-AGENT");