Skip to main content

parse

Function parse 

Source
pub fn parse(
    platform_header: Option<&str>,
    user_agent: Option<&str>,
) -> DeviceInfo
Expand description

Parse device info from the x-forge-platform header and User-Agent.

The platform header is authoritative for device_type when present (the client SDK knows whether it’s running as web, desktop, or mobile). Browser and OS are always parsed from the User-Agent.