I am trying to get cookie information from under Network --> RequestHeader of below page https://www.nseindia.com/market-data/equity-derivatives-watch All I am getting from the below code is Response headers "set-cookie", but I need "cookie" information under request headers. Below is the code I've tried.
Function GetCookie(strUrl)
With CreateObject("WinHttp.WinHttpRequest.5.1")
.Open "GET", strUrl, False
.SetRequestHeader "REFERER", strUrl
.SetRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
.SetRequestHeader "Accept", "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
.SetRequestHeader "Accept-Language", "en-us,en;q=0.5"
.SetRequestHeader "Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
.Send
strCookie = .GetAllResponseHeaders
strCookie = Split(strCookie, vbCrLf)
Debug.Print strCookie
' strCookie = Split(strCookie, ";")(0)
' GetCookie = strCookie
End With
End Function
Sub Demo()
Debug.Print GetCookie("https://www.nseindia.com/market-data/equity-derivatives-watch")
End Sub
I need the below cookie information