aly revised this gist . Go to revision
1 file changed, 14 insertions
popcorntime-remote.js(file created)
| @@ -0,0 +1,14 @@ | |||
| 1 | + | data = await (await fetch("http://localhost:8008", { | |
| 2 | + | method: "POST", | |
| 3 | + | withCredentials: true, | |
| 4 | + | headers: { | |
| 5 | + | "Content-Type": "application/json", | |
| 6 | + | Authorization: "Basic cG9wY29ybjpwb3Bjb3Ju" | |
| 7 | + | }, | |
| 8 | + | body: JSON.stringify({ | |
| 9 | + | jsonrpc: "2.0", | |
| 10 | + | id:"asdf", | |
| 11 | + | method:"getcurrentlist", | |
| 12 | + | params:[] | |
| 13 | + | }) | |
| 14 | + | })).json() | |
Newer
Older