Check src/get-paci-data.ts for demo usage
Example request:
How to construct params
query parameter:
Below is an example I got from Chrome Dev tools when you visit https://gis.paci.gov.kw/Location/48.100216/29.215362
x=48.100216
&y=29.215362
&maplevel=
&mapscale=2256.994353
&xmin=47.77940063476482
&ymin=28.857864462816597
&xmax=47.820599365233555
&ymax=29.863234359727123
&language=ar
¤tlocationx=
¤tlocationy=
&userid=
&username=
&userlogintype=
&callerid=178.61.224.228
&callertype=Chrome
&callerversion=undefined
&calleros=Mozilla%2F5.0%20(Macintosh%3B%20Intel%20Mac%20OS%20X%2010_15_7)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F115.0.0.0%20Safari%2F537.36%20Edg%2F115.0.1901.188
&requesttime=2023-08-09T22%3A09%3A50%2B03%3A00
You can find out how it's encrypted also from Chrome Dev tools.
use encodeURIComponent
to encode the encrypted data
const queryParams = 'x=48.100216&y=29.215362&maplevel=....'
const encryptedQueryParams = tripleDESEncryption(queryParams, ENCRYPTION_KEY)
const encoded = encodeURIComponent(encryptedQueryParams)
const result = await fetch(`https://kfappsrv.paci.gov.kw/kuwaitfinder/server/api/search/identify?params=${encoded}`)