Skip to content

Commit

Permalink
added js
Browse files Browse the repository at this point in the history
  • Loading branch information
l0rtk committed Dec 21, 2021
1 parent 9d6f29a commit 6ee865c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions static/spinner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

const keywords = document.currentScript.getAttribute('keywords')
const websites = document.currentScript.getAttribute('websites')

const data = {
'keywords' : keywords,
'websites' : websites
}

const Url = "http://127.0.0.1:5000/hello_world"


const postParams = {
method:"POST",
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data)
}

fetch(Url,postParams)
.then(data=>{return data.json()})
.then(res=>{console.log(res)})

0 comments on commit 6ee865c

Please sign in to comment.