mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-23 13:32:03 +01:00
Remove .json() calls
This commit is contained in:
parent
7f10b5e63d
commit
cfa539aa36
1 changed files with 6 additions and 7 deletions
13
src/index.ts
13
src/index.ts
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue