Files
discordeno/src/rest/request_manager.ts
T
Skillz4Killz ebb15afa0e refactor(rest): separate functions into diff files (#685)
* shtufffff

* fixe rate limit path infinite loop

* refactor

* ID > id

* Update process_request_headers.ts

* file names

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>
Co-authored-by: ayntee <ayyantee@gmail.com>
2021-03-29 23:50:08 +04:00

20 lines
542 B
TypeScript

import { rest } from "./rest.ts";
export const RequestManager = {
get: (url: string, body?: unknown) => {
return rest.runMethod("get", url, body);
},
post: (url: string, body?: unknown) => {
return rest.runMethod("post", url, body);
},
delete: (url: string, body?: unknown) => {
return rest.runMethod("delete", url, body);
},
patch: (url: string, body?: unknown) => {
return rest.runMethod("patch", url, body);
},
put: (url: string, body?: unknown) => {
return rest.runMethod("put", url, body);
},
};