Open construct22 opened 9 months ago
i believe this can be merged after the commented lines are deleted @Lienus10 ?
I'm not sure if we want to return an empty dataframe in the case that both API versions fail, I think letting it error out would be safer, what do you think, @construct22 ?
Yes, an empty dateframe is probably a bad idea, throwing an exception would make it obvious something went wrong.
created a new method url_fetch that first tries the v7 http url and if that fails, then tries the v6 version of url. If both fails return an empty data frame.
Also, used urljoin to contruct the url as if a query was made on ^SPX if was never successful since the caret is a special character in urls and needs to be quoted