CodingSans / billingo-client

MIT License
6 stars 0 forks source link

ReferenceError: Headers is not defined #14

Closed laxadev closed 2 years ago

laxadev commented 2 years ago

Hello there,

I'm trying to use this package in one of my projects which is built-in AdonisJS. When I simply try to list all the invoices await DocumentService.listDocument().then(res => console.log({res})) It always throws this error:

ReferenceError: Headers is not defined
    at /.../node_modules/@codingsans/billingo-client/lib/client/core/request.js:156:5
    at Generator.next (<anonymous>)
    at fulfilled (/.../node_modules/@codingsans/billingo-client/lib/client/core/request.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Same with all the others like:

await PartnerService.createPartner({})

What could be the problem?

davidzambo commented 2 years ago

I have the same error.

Lacka90 commented 2 years ago

Thanks for reporting the issue. It's fixed in version 2.1.0