diff --git a/src/index.ts b/src/index.ts index 554e501..9d06be8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -100,14 +100,13 @@ export class Connection { private async postJSON(url: string | URL, body = {}): Promise { const auth = btoa(`${this.credentials.username}:${this.credentials.password}`) - const response = await fetch(url, { + const response = await fetch(url.toString(), { method: 'POST', body: JSON.stringify(body), headers: { 'Content-Type': 'application/json', Authorization: `Basic ${auth}` - }, - credentials: 'include' + } }) if (response.ok) {