LOCAL lcUrl, lcCookie, lcReferer, lcResponse
lcUrl = "https://www.,sz399001,sz399006,sh000300,sh000011&t=2001"
* Cookie 拼成一串
lcCookie = "Hm_lvt_c778c7d65526df5fd97b5496ac256a50=1764331485; HMACCOUNT=5B22A736394F50F5; Hm_lpvt_c778c7d65526df5fd97b5496ac256a50=1764331497"
* 创建 HTTP 对象
oHttp = CREATEOBJECT("WinHttp.WinHttpRequest.5.1")
WITH oHttp
.Open("GET", lcUrl, .F.)
&& 同步方式
.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36")
.SetRequestHeader("Accept", "*/*")
.SetRequestHeader("X-Requested-With", "XMLHttpRequest")
.SetRequestHeader("Referer", "https://www.)
.SetRequestHeader("Cookie", lcCookie)
.Send()
&& 真正发请求
ENDWITH
lcResponse = oHttp.ResponseText
? "原始 JSON:", lcResponse