Remove .json() calls

This commit is contained in:
Luc Perkins 2024-05-20 09:36:30 -03:00
parent 7f10b5e63d
commit cfa539aa36
No known key found for this signature in database
GPG key ID: 16DB1108FB591835

View file

@ -50,7 +50,6 @@ class MagicNixCacheAction {
limit: 1, limit: 1,
methods: ["POST", "GET", "PUT", "HEAD", "DELETE", "OPTIONS", "TRACE"], methods: ["POST", "GET", "PUT", "HEAD", "DELETE", "OPTIONS", "TRACE"],
}, },
resolveBodyOnly: false,
hooks: { hooks: {
beforeRetry: [ beforeRetry: [
(error, retryCount) => { (error, retryCount) => {
@ -275,9 +274,9 @@ class MagicNixCacheAction {
try { try {
actionsCore.debug(`Indicating workflow start`); actionsCore.debug(`Indicating workflow start`);
const hostAndPort = inputs.getString("listen"); const hostAndPort = inputs.getString("listen");
const res: Response<string> = await this.client const res: Response<string> = await this.client.post(
.post(`http://${hostAndPort}/api/workflow-start`) `http://${hostAndPort}/api/workflow-start`,
.json(); );
if (res.statusCode !== 200) { if (res.statusCode !== 200) {
this.failInStrictMode( this.failInStrictMode(
@ -315,9 +314,9 @@ class MagicNixCacheAction {
try { try {
actionsCore.debug(`about to post to localhost`); actionsCore.debug(`about to post to localhost`);
const hostAndPort = inputs.getString("listen"); const hostAndPort = inputs.getString("listen");
const res: Response<string> = await this.client const res: Response<string> = await this.client.post(
.post(`http://${hostAndPort}/api/workflow-finish`) `http://${hostAndPort}/api/workflow-finish`,
.json(); );
if (res.statusCode !== 200) { if (res.statusCode !== 200) {
this.failInStrictMode( this.failInStrictMode(