Last active
November 2, 2021 20:16
-
-
Save fridezlucas/f6b36a169291f83c7faaca8975228191 to your computer and use it in GitHub Desktop.
Medium TypeScript GET+ POST RESTful client - IApiClient
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface ApiClient { | |
| instance(): ApiClient; | |
| get<T>(url: string): Promise<T>; | |
| post<T>(url: string, body: any): Promise<T>; | |
| put<T>(url: string, body: any): Promise<T>; | |
| patch<T>(url: string, body: any): Promise<T>; | |
| delete<T>(url: string): Promise<T>; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment