Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var params = {
- grocery_list_name: 'MY_grocery_LIST',
- items: [{
- "product":"320",
- "price" : "6.99",
- "quantity" : "2",
- "special_deal":"1",
- "template":"1"
- },{
- "product":"321",
- "price" : "7.99",
- "quantity" : "3",
- "special_deal":"2",
- "template":"2"
- },]
- };
- try {return fetch(URL, { method: 'POST', headers: {
- 'Authorization': 'bearer AtE9slkuafhebbjKkYe0tTimMZc',
- 'Content-Type': 'application/json'},
- body: JSON.stringify(params),})
- .then(function(response){
- console.log(response);
- return response.json();
- })
- } catch (error) {
- console.error(error);
- } finally { }
Add Comment
Please, Sign In to add comment