Get data from rest service using D3

后端 未结 3 752
暗喜
暗喜 2021-01-05 03:07

I have a working web service at http://localhost/RestService/GetTransactionByStatus/1. When I run that URL on my browser I\'m getting the correct JSON-formatted response:

3条回答
  •  隐瞒了意图╮
    2021-01-05 04:04

    Update 2019:

    For any host - localhost or some server, you can directly get data by just mentioning rest api path, so that your code can be used on any server

    d3.json("/RestService/GetTransactionByStatus/" + id, function(error, data) {
                console.log(data);
    });
    

提交回复
热议问题