Skip to content

Commit

Permalink
✨ Add 'arrayBuffer' response type
Browse files Browse the repository at this point in the history
  • Loading branch information
cermakjiri committed May 19, 2021
1 parent 3c8e0a3 commit 49d4663
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export function parseResponse(responseType: ResponseType | undefined, response:
case 'text':
return response.text();

case 'arrayBuffer':
return response.arrayBuffer();

default:
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@ackee/antonio-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Logger } from 'loglevel';

export type RequestMethod = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'head';

export type ResponseType = 'json' | 'blob' | 'formData' | 'text';
export type ResponseType = 'json' | 'blob' | 'formData' | 'text' | 'arrayBuffer';

export type RequestBody = BodyInit | any;

Expand Down

0 comments on commit 49d4663

Please sign in to comment.