d3.js get JSON from url

后端 未结 4 2172
庸人自扰
庸人自扰 2020-12-21 02:01

The situation is that i am trying to get d3 to read a JSON file which is stored in Windows Azure Blob storage. If i paste the url into a browser then the file is downloaded

4条回答
  •  情歌与酒
    2020-12-21 02:39

    For REST api use d3.request:

    d3.request("api_url/path")
    .header("Content-Type", "application/json")
    .post(function(data) {
       console.log(data);
    })
    

提交回复
热议问题