Get Service
=====================service list===============
const allservice = () =>{
let input = {
"key": ""
};
const requestOptions = {
method : 'POST',
header : {'Content-Type' : 'application/json' },
body : JSON.stringify(input)
};
fetch("https://www.campusinterview.in/webapi/Billing/allservice", requestOptions)
.then(response => response.json())
.then(data =>{
alert(data.length);
})
}
========================Product List================
const allproduct = () =>{
let input = {
"key": ""
};
const requestOptions = {
method : 'POST',
header : {'Content-Type' : 'application/json' },
body : JSON.stringify(input)
};
fetch("https://www.campusinterview.in/webapi/Billing/allproduct", requestOptions)
.then(response => response.json())
.then(data =>{
alert(data.length);
})
}
=================Save New Product===========
const saveproduct = () =>{
let input = {
"key": "",
"productname": "",
"price": "",
"qty": ""
};
const requestOptions = {
method : 'POST',
header : {'Content-Type' : 'application/json' },
body : JSON.stringify(input)
};
fetch("https://www.campusinterview.in/webapi/Billing/saveproduct", requestOptions)
.then(response => response.text())
.then(message =>{
alert(message);
})
}
=============================================