Skip to content

Commit

Permalink
added console again
Browse files Browse the repository at this point in the history
  • Loading branch information
tishoyanchev committed Sep 29, 2023
1 parent 6691edf commit ac994f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "infineon-feedback",
"version": "0.0.13",
"version": "0.0.15",
"description": "Stencil Component Starter",
"main": "dist/index.cjs.js",
"module": "dist/index.js",
Expand Down
34 changes: 17 additions & 17 deletions src/components/feedbackWidget/feedbackWdget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,23 @@ export class FeedbackWidget {
const url = 'https://example.com/api';
const dataArray = this.feedBackData;

const requestOptions = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(dataArray),
};
fetch(url, requestOptions)
.then((response) => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
})
.catch((error) => {
console.error('Error:', error);
});

// const requestOptions = {
// method: 'POST',
// headers: {
// 'Content-Type': 'application/json',
// },
// body: JSON.stringify(dataArray),
// };
// fetch(url, requestOptions)
// .then((response) => {
// if (!response.ok) {
// throw new Error('Network response was not ok');
// }
// })
// .catch((error) => {
// console.error('Error:', error);
// });
console.log('before set cookie')
//here I need to invoke the 'set cookie' and set the cookie.
this.setCookie("username", 365)
}
Expand Down

0 comments on commit ac994f9

Please sign in to comment.