abhattac commited on
Commit
25dffb5
1 Parent(s): 6a07a92

debugging fetch

Browse files
Files changed (1) hide show
  1. index.html +4 -1
index.html CHANGED
@@ -22,7 +22,10 @@
22
  const prompt = textbox.value
23
  btn.addEventListener("click", event => {
24
  fetch(`/gpt?prompt=${prompt}`)
25
- .then(res => res.json())
 
 
 
26
  .then(res => {
27
  console.log(res)
28
  res.textContent = res
 
22
  const prompt = textbox.value
23
  btn.addEventListener("click", event => {
24
  fetch(`/gpt?prompt=${prompt}`)
25
+ .then(res => {
26
+ console.log(res)
27
+ res.json()
28
+ })
29
  .then(res => {
30
  console.log(res)
31
  res.textContent = res