(method: Optional[str])
| 161 | headers: Dict[str, str] = {} |
| 162 | major_match = re.search(r"(?:Chrome|Chromium|Edg|EdgA|EdgiOS)/(\d+)", ua) |
| 163 | is_mobile = any(token in ua for token in ("Android", "iPhone", "iPad", "Mobile")) |
| 164 | headers["sec-ch-ua-mobile"] = "?1" if is_mobile else "?0" |
| 165 | |
| 166 | if "Windows" in ua: |
| 167 | headers["sec-ch-ua-platform"] = '"Windows"' |
| 168 | elif "Macintosh" in ua or "Mac OS X" in ua: |
| 169 | headers["sec-ch-ua-platform"] = '"macOS"' |
| 170 | elif "Android" in ua: |
no outgoing calls
no test coverage detected