|
const instance = axios.create({
baseURL: 'https://dev.azure.com/msc-dev/Pricing/_apis'
});
instance.get('/item?api-version=1')
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.error(error);
});
const getItemById = async (id) =>
azure.get(`/item/${id}`)
.then(function (response) {
const item = response.data.value;
return item;
})
.catch(function (error) {
console.error(error);
});
let item = await getItemById('1');
$("#result").html(JSON.stringify(item, null, 4));
|