Skip to content

Commit

Permalink
fixup! Support compression.
Browse files Browse the repository at this point in the history
  • Loading branch information
iclanton committed Dec 9, 2024
1 parent 5f09e6f commit 5007f86
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/rush-lib/src/utilities/WebClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,15 @@ const makeRequestAsync: FetchFn = async (
getTextAsync: async () => {
if (bodyString === undefined) {
const buffer: Buffer = await result.getBufferAsync();
// eslint-disable-next-line require-atomic-updates
bodyString = buffer.toString();
}

return bodyString;
},
getJsonAsync: async <TJson>() => {
if (bodyJson === undefined) {
// eslint-disable-next-line require-atomic-updates
bodyJson = await result.getTextAsync();
}

Expand Down Expand Up @@ -178,6 +180,7 @@ const makeRequestAsync: FetchFn = async (
}
}

// eslint-disable-next-line require-atomic-updates
decodedBuffer = buffer;
} else {
decodedBuffer = responseData;
Expand Down

0 comments on commit 5007f86

Please sign in to comment.