I would like to access the information in this link from javascript: https://www.boursorama.com/bourse/action/graph/ws/download?length=30&period=-2&symbol=AAPL
On powershell I can perfectly do what I want with:
$uri = "https://www.boursorama.com/bourse/action/graph/ws/download?length=30&period=-2&symbol=AAPL"
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$cookie = New-Object System.Net.Cookie
$cookie.Name = 'RT'
$cookie.Domain = 'boursorama.com'
$session.Cookies.Add($cookie)
Invoke-WebRequest -WebSession $session -UseBasicParsing -DisableKeepAlive -Uri $uri
How to do it on javascript? Thanks a lot