blob: bf88ddd9ec174bb43db24daf7888d4ab9fdba98b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import * as GPodder from './gpodder.js'
const user = new GPodder.GPodderUser({
username: "iam@not.real",
password: "12345678aB@"
});
console.log(user)
console.log(user.username, user.password);
GPodder.init({
baseURL: "http://localhost:8080",
throwHandler: err => err
})
async function testGPodder() {
const register = await GPodder.register(user);
console.log(register.status);
const login = await GPodder.login(user)
console.log(login.status, login.headers);
const response = await GPodder.getTitles();
const json = await response.text();
console.log(`${response.status} "${json}"`);
}
testGPodder();
|