Hey guys,here i am using the httpjob to get the cookie from my school's websit,but i have noticed that when i am using wifi,i send the get request,and it respond very quickly...but when i am using my 5g network instead of wifi...it will wait...wait until 30s(the timeout) though it maybe have already got the response,i set the timeout to be 1000ms...and it gives the respond in 1s....what is the problem??i am so confused...here is my code,any reply is appreciated,thank you
Sub nsmc_jiaowuxitong_login()
Dim http As HttpJob
http.Initialize("http", Me)
http.Download(url)
http.GetRequest.SetHeader("Connection", "keep-alive")
http.GetRequest.SetHeader("Cache-Control", "max-age=0")
http.GetRequest.SetHeader("sec-ch-ua", """Not.A/Brand"";v=\""8\"", \""Chromium\""v=\""114\"", \""Google Chrome\""v=\""114\""")
http.GetRequest.SetHeader("sec-ch-ua-mobile", "?0")
http.GetRequest.SetHeader("sec-ch-ua-platform", """Windows""")
http.GetRequest.SetHeader("Upgrade-Insecure-Requests", "1")
http.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36")
http.GetRequest.SetHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7")
http.GetRequest.SetHeader("Sec-Fetch-Site", "same-origin")
http.GetRequest.SetHeader("Sec-Fetch-Mode", "navigate")
http.GetRequest.SetHeader("Sec-Fetch-User", "?1")
http.GetRequest.SetHeader("Sec-Fetch-Dest", "document")
http.GetRequest.SetHeader("Referer", url2)
http.GetRequest.SetHeader("Accept-Encoding", "gzip, deflate, br")
http.GetRequest.SetHeader("Accept-Language", "zh-CN,zh;q=0.9")
http.GetRequest.Timeout = 1000 ’if i delete this...it will wait for 30s
Wait For (http) JobDone(http As HttpJob)
If http.Success Then
Dim headers = http.Response.GetHeaders As Map
Dim setcookie = headers.Get("set-cookie") As List
Dim jessionid = GetIDValue(setcookie.Get(0)) As String
Dim serverid = GetIDValue(setcookie.Get(1)) As String
Sleep(100)
MsgboxAsync(jessionid & "|" & serverid,1)
Else
Sleep(100)
MsgboxAsync("fail",1)
End If
http.Release
End Sub