after a few error and trials i have managed to authorize my data and load into the html but however now how can i call the api from database and load into my table
here the code for my file
<table id="infoTable" class="table" style="width: 920px; margin: 0; padding: 0; border: 0;">
<thead>
<tr>
<th scope="col" style="text-align: justify;"> </th>
<th scope="col" style="text-align: center; padding-right: 2px;"></th>
<th scope="col" style="text-align: center;"></th>
</tr>
</thead>
<tbody>
<tr>
<td scope="row" style="padding-left: 45px;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
</tr>
</tbody>
</table>
here the ajax file
$.ajax({
// The url that you're going to post
/*
This is the url that you're going to put to call the
backend api,
in this case, it's
https://ecoexchange.dscloud.me:8080/api/get (production env)
*/
url:"https://ecoexchange.dscloud.me:8080/api/get",
// The HTTP method that you're planning to use
// i.e. GET, POST, PUT, DELETE
// In this case it's a get method, so we'll use GET
method:"GET",
// In this case, we are going to use headers as
headers:{
// The query you're planning to call
// i.e. <query> can be UserGet(0), RecyclableGet(0), etc.
query:"RecyclableGet(0)",
// Gets the apikey from the sessionStorage
apikey:sessionStorage.getItem("apikey")
},
success:function(data,textStatus,xhr) {
console.log(data);
},
error:function(xhr,textStatus,err) {
console.log(err);
}
});
So this is all i have currently i trying to load my database into the table but so far i am receiving is a blank empty table, needed some help and advise here
Thanks