imamnurby commited on
Commit
3c5e5ce
1 Parent(s): cd6029b

Update static/frontend.js

Browse files
Files changed (1) hide show
  1. static/frontend.js +2 -7
static/frontend.js CHANGED
@@ -11,13 +11,8 @@
11
  async function getResponse(url, user_query){
12
  try {
13
  let predictions = await fetch(url,{
14
- method: 'POST',
15
- body: JSON.stringify({'user_query': user_query}),
16
- headers: {
17
- 'Content-type': 'application/json; charset=UTF-8',
18
- 'Access-Control-Allow-Origin': '*',
19
- 'Access-Control-Allow-Methods': 'POST, GET',
20
- }
21
  });
22
  console.log(predictions)
23
  return predictions.json()
 
11
  async function getResponse(url, user_query){
12
  try {
13
  let predictions = await fetch(url,{
14
+ method: 'GET',
15
+ body: JSON.stringify({'user_query': user_query})
 
 
 
 
 
16
  });
17
  console.log(predictions)
18
  return predictions.json()