从网页获取数据时出现C#错误

时间:2017-12-09 04:11:55

标签: c#

收到此错误:System.Net.WebException:'远程服务器返回错误:(400)错误请求。'但我仍然可以在网络浏览器中访问数据。

WebClient client = new WebClient(); String downloadedString = client.DownloadString("https://api.gdax.com/products/LTC-USD/book/");

1 个答案:

答案 0 :(得分:0)

你的道路是错的。它必须在文件名末尾。见下文:

https://api.gdax.com/products/LTC-USD/book/index.html or default.aspx