scttcper / qbittorrent

qBittorrent api wrapper
https://qbittorrent.vercel.app
MIT License
42 stars 13 forks source link

The `body` option must be a stream.Readable, string or Buffer #91

Closed Elyspio closed 3 years ago

Elyspio commented 3 years ago

Hello,

I have the following error Uncaught (in promise) RequestError: The body option must be a stream.Readable, string or Buffer on every request with your lib and I don't understand why ^^'

I'm testing with your example code :


const client = new QBittorrent({
  baseUrl: 'http://localhost:8080/',
  username: 'admin',
  password: 'adminadmin',
});

async function main() {
  const res = await qbittorrent.getAllData();
  console.log(res);
}

Have nice day