HarmonyOS有类似System.getProperty("http.agent")这个系统方法吗

HarmonyOS
2024-12-27 15:02:36
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
FengTianYa

关于User-Agent的获取如下:

1、http模块暂无获取User-agent的接口,http模块默认的user-agent为:"libcurl-agent/1.0"

源码路径:https://gitee.com/openharmony/communication_netstack/blob/master/frameworks/native/http/http_client/http_client_constant.cpp

2、web组件user-agent可以通过以下接口获取:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-webview-V5#getuseragent

分享
微博
QQ
微信
回复
2024-12-27 17:52:38
相关问题
HarmonyOS ArkTS类似bigdecimal的方法
1436浏览 • 1回复 待解决
鸿蒙系统类似苹果的服务器
10515浏览 • 1回复 待解决
HarmonyOS http/rcpcookieManager
742浏览 • 1回复 待解决
HarmonyOS RN应用如何修改http的User-Agent
1409浏览 • 1回复 待解决
HarmonyOS ModuleInfo 这个native 接口
884浏览 • 1回复 待解决
HarmonyOS http请求同步的方式
1216浏览 • 1回复 待解决
HarmonyOS 类似bugly的开发包
1136浏览 • 1回复 待解决
提问
该提问已有0人参与 ,帮助了0人