Tag: scala dispatch

为什么dispatch会抛出“java.net.ConnectException:General SSLEngine …”和特定URL的“意外状态”exception?

我有以下非工作代码: object Main extends App { import dispatch._ def test(address: String) = { Await.result(Http.default(url(address).GET OK as.String), Duration.Inf) } // This works fine val s1 = test(“http://download.finance.yahoo.com/d/quotes.csv?s=MSFT&f=sohgbav”) println(s1) // This throws Exception 1 val s2 = test(“http://www.alphavantage.co/query?function=TIME_SERIES_DAILY_ADJUSTED&symbol=MSFT&apikey=demo&datatype=csv”) println(s2) // This throws Exception 2 val s3 = test(“https://www.alphavantage.co/query?function=TIME_SERIES_DAILY_ADJUSTED&symbol=MSFT&apikey=demo&datatype=csv”) println(s3) } 我想知道为什么“s1”工作正常,而“s2”和“s3”抛出exception。 抛出的exception是: 例外1: [error] ! access URL […]