是黑莓用户代理只能通过浏览器发送的? [英] Is Blackberry User-Agent only sent via browser?

查看:128
本文介绍了是黑莓用户代理只能通过浏览器发送的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下wheter在HTTP请求头中的User-Agent属性只能通过浏览器发送的?

I would like to ask wheter the User-Agent property in the HTTP request header only sent via browser?

当我送从BlackBerry应用程序中的HTTP / HTTPS请求时,它似乎没有用户代理包含在HTTP头。

When I send a http/https request from a blackberry application, it seems there is no user-agent contains in the http header.

非常感谢!

此外,如果这是不可能从请求获取用户代理,是我们能够从黑莓设备获取用户代理

Also, if it is not possible to get the user agent from the request, are we able to get the user agent from Blackberry device?

谢谢!

推荐答案

是,根据Java文档(javax.microedition.io
),看来,除非你将其设置用户代理不会自动包括在内。

Yes, according to the Java document (javax.microedition.io ), it seems that user-agent is not automatically included unless you set it.

应用程序负责
  格式化和请求该
  用户代理字段被包括在HTTP
  通过调用setRequestProperty请求
  方法在接口

The application is responsible for formatting and requesting that the User-Agent field be included in HTTP requests via the setRequestProperty method in the interface

<一个href=\"http://www.j2megame.org/j2meapi/JSR_271_Mobile_Information_Device_Profile_3_0/javax/microedition/io/package-summary.html\" rel=\"nofollow\">http://www.j2megame.org/j2meapi/JSR_271_Mobile_Information_Device_Profile_3_0/javax/microedition/io/package-summary.html

这篇关于是黑莓用户代理只能通过浏览器发送的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆