bring back 065614d668
This commit is contained in:
parent
8bfc714209
commit
57741ac2d9
4 changed files with 43 additions and 3 deletions
26
src/ciderkit/public.js
Normal file
26
src/ciderkit/public.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
const CiderKit = {
|
||||
v1: {
|
||||
musickit: {
|
||||
async mkv3(route, body, options) {
|
||||
let opts = {
|
||||
method: 'POST',
|
||||
cache: 'no-cache',
|
||||
credentials: 'same-origin',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
redirect: 'follow',
|
||||
referrerPolicy: 'no-referrer',
|
||||
body: {}
|
||||
}
|
||||
opts.body = JSON.stringify({
|
||||
route: route,
|
||||
body: body,
|
||||
options: options
|
||||
})
|
||||
let response = await fetch("http://localhost:9000/api/musickit/v3", opts);
|
||||
return response.json()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue