From ec876d43e048d66765bc3cbb2c42417230a07090 Mon Sep 17 00:00:00 2001 From: Nikhil Kumar Singh Date: Mon, 5 Oct 2026 21:38:20 +0530 Subject: [PATCH] feat: base header provider --- fampay/utils.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 fampay/utils.py diff --git a/fampay/utils.py b/fampay/utils.py new file mode 100644 index 0000000..cf1bb58 --- /dev/null +++ b/fampay/utils.py @@ -0,0 +1,17 @@ +from fampay.constants import FamAppConstants +from fampay.phone import AndroidPhone + + +def common_headers(phone: AndroidPhone) -> dict[str, str]: + ua = phone.fampay_user_agent + return { + "X-APP-VERSION": FamAppConstants.APP_VERSION_CODE, + "X-PLATFORM": FamAppConstants.PLATFORM, + "X-DEVICE-OS-VERSION": phone.os_release, + "X-DEVICE-MODEL": phone.model, + "DEVICE-ID": phone.fampay_device_id, + "User-Agent": ua, + "X-DEVICE-DETAILS": ua, + "Accept": "application/json", + "Content-Type": "application/json", + } -- 2.51.2