Skip to content

Commit

Permalink
chore: integrate getBufferResponse (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Jul 11, 2024
1 parent 2ac2834 commit 9205e49
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions src/fetch-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { isPlainObject } from "./is-plain-object.js";
import { RequestError } from "@octokit/request-error";
import type { EndpointInterface } from "@octokit/types";

import getBuffer from "./get-buffer-response.js";

export default function fetchWrapper(
requestOptions: ReturnType<EndpointInterface>,
) {
Expand Down Expand Up @@ -175,7 +173,7 @@ async function getResponseData(response: Response) {
return response.text();
}

return getBuffer(response);
return response.arrayBuffer();
}

function toErrorMessage(data: any) {
Expand Down
3 changes: 0 additions & 3 deletions src/get-buffer-response.ts

This file was deleted.

0 comments on commit 9205e49

Please sign in to comment.