From 58526c50f5100a2295aa87556d7ee8086a6516b5 Mon Sep 17 00:00:00 2001 From: Lachezar Angelov Date: Mon, 6 Oct 2025 19:12:04 -0700 Subject: [PATCH] Use UPPERCASE for HTTP methods --- lib/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index 041d22b..bc6d3c3 100755 --- a/lib/index.js +++ b/lib/index.js @@ -238,7 +238,7 @@ class PubSubClient extends EventEmitter { * @returns {*} */ async update(id, data = {}, options = {}) { - debug.info('patch', id); + logger.info('patch', id); if (!id) { throw new Error('required event id'); } @@ -280,7 +280,7 @@ class PubSubClient extends EventEmitter { const body = JSON.stringify(data); const opts = { url: url.href, - method: 'post', + method: 'POST', headers: this.#makeHeaders(body), body, signal: AbortSignal.timeout(this.#timeout) @@ -288,7 +288,7 @@ class PubSubClient extends EventEmitter { if (data.id) { opts.url += `/${data.id}`; - opts.method = 'patch'; + opts.method = 'PATCH'; } try {