Hello I am facing a weird error I struggle to find solution for.
I have created a code which allows me to fetch data from internet page.
MyRequest.Open "GET", URL
MyRequest.SetRequestHeader "Host", URlHost
MyRequest.SetRequestHeader "User-Agent", "Mozilla/5.0 (Windows NT 6.1; rv:57.0) Gecko/20100101 Firefox/57.0"
MyRequest.SetRequestHeader "Accept", "image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*"
MyRequest.SetRequestHeader "Accept-Language", "pl,en-US;q=0.7,en;q=0.3"
MyRequest.SetRequestHeader "Accept-Encoding", "gzip, deflate, br"
MyRequest.SetRequestHeader "Referer", RefererURL
MyRequest.SetRequestHeader "Connection", "keep-alive"
MyRequest.SetRequestHeader "Upgrade-Insecure-Request", "1"
MyRequest.SetRequestHeader "Cookie", CookieString
MyRequest.send
Response=MyRequest.responsetext
And here is a weird part. Whenever I use CookieString generated by previous requests ( including loging in and search - both sucessfull) this particual request does not work (internal server error). But If I do manual search in Firefox/ IE/ Chrome and copy data from developers tab and paste the cookie obtained there - it works. It is weird because all the other requests where I am using those cookies generated by the code - works and only this one does not. I've tried automatic cookie handling however I was not succesfull as well.
I ve tried Winhttp, msxmlhttp and server versions of them.
Below there are 2 cookies. First copied form Internet Explorer another one generated by code.
"testcookie=1; JSESSIONID=0F7D44DC25EDC10EFE493825A89A8B6E.3dsprod45; SERVERID=rd727o00000000000000000000ffff89b31ae4o31010"
"testcookie=1; JSESSIONID=E2F86BBE78B581A3BBAD5DE2D637C4E4.3dsprod41; SERVERID=rd727o00000000000000000000ffff89b31ae4o31002"
Does anyone have any suggestion what might be an issue here?