Should I use custom headers or useragent header to send device informations to the server

夙愿已清 提交于 2019-12-04 21:20:22

问题


Every time I send a API request to my server I want send informations like device type and OS version (from my mobile app). My first thought is to use User Agent but I wonder if there's any benefits to use custom http header like "X-deviceType" or/and "X-osVersion" instead.


回答1:


I am using the X-Device HTTP Header.

Works well for the most part, however I have noticed that some requests from behind a proxy seem to be stripping the data from that header.



来源:https://stackoverflow.com/questions/18475724/should-i-use-custom-headers-or-useragent-header-to-send-device-informations-to-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!