Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't download Json as text
#2
It seems that it is opening a download file prompt. So, it times out.
I opened the url in Internet Explorer and seen this
Best way I found around it is this

this will download it directly to a file.
Code:
Copy      Help
if(!FileExists("C:\BASE" 1))
,mkdir "Base" "C:"
str filepath.expandpath("C:\BASE\file1.txt")
int i=URLDownloadToFile(0 "https://www.cmegroup.com/CmeWS/mvc/Settlements/Futures/Settlements/310/FUT?&tradeDate=12/14/2021" filepath 0 0)
if i=0
,_s.getfile("C:\BASE\file1.txt")
,out _s


Messages In This Thread
Can't download Json as text - by lostruler - 12-15-2021, 02:50 PM
RE: Can't download Json as text - by Kevin - 12-15-2021, 05:12 PM
RE: Can't download Json as text - by lostruler - 12-15-2021, 05:53 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)