Skip to content

Commit

Permalink
Merge pull request #7 from stan-donarise/requset-body-1
Browse files Browse the repository at this point in the history
request body instead of query string
  • Loading branch information
blokhin authored Jul 10, 2024
2 parents ee4d3a8 + e88fa09 commit 52c0568
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/app.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ namespace $.$$ {

const structure = JSON.stringify( this.fetch_by_number( number ) )
const params = new URLSearchParams({ structure })
const url = `https://labs.mpds.io/predict?${ params.toString() }`
const url = `https://labs.mpds.io/predict`

const prediction = this.$.$mol_wire_sync( this ).$.$mol_fetch.success( url, {
method: 'post',
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: params.toString(),
} ).json() ?? {} as any

return prediction
Expand Down

0 comments on commit 52c0568

Please sign in to comment.