Skip to content

Commit

Permalink
request body instead of query string
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-donarise committed Jul 10, 2024
1 parent ee4d3a8 commit e88fa09
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 e88fa09

Please sign in to comment.