From cfa539aa360d722c3f0071a1a1dbf0b2be6ac8f3 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Mon, 20 May 2024 09:36:30 -0300 Subject: [PATCH] Remove .json() calls --- src/index.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index 575d0b2..fece483 100644 --- a/src/index.ts +++ b/src/index.ts @@ -50,7 +50,6 @@ class MagicNixCacheAction { limit: 1, methods: ["POST", "GET", "PUT", "HEAD", "DELETE", "OPTIONS", "TRACE"], }, - resolveBodyOnly: false, hooks: { beforeRetry: [ (error, retryCount) => { @@ -275,9 +274,9 @@ class MagicNixCacheAction { try { actionsCore.debug(`Indicating workflow start`); const hostAndPort = inputs.getString("listen"); - const res: Response = await this.client - .post(`http://${hostAndPort}/api/workflow-start`) - .json(); + const res: Response = await this.client.post( + `http://${hostAndPort}/api/workflow-start`, + ); if (res.statusCode !== 200) { this.failInStrictMode( @@ -315,9 +314,9 @@ class MagicNixCacheAction { try { actionsCore.debug(`about to post to localhost`); const hostAndPort = inputs.getString("listen"); - const res: Response = await this.client - .post(`http://${hostAndPort}/api/workflow-finish`) - .json(); + const res: Response = await this.client.post( + `http://${hostAndPort}/api/workflow-finish`, + ); if (res.statusCode !== 200) { this.failInStrictMode(