feat(rest): use undici (#7747)

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: ckohen <chaikohen@gmail.com>
This commit is contained in:
Khafra
2022-05-12 16:49:15 -04:00
committed by GitHub
parent 4515a1ea80
commit d1ec8c37ff
19 changed files with 964 additions and 605 deletions

View File

@@ -1,7 +1,7 @@
import { DefaultRestOptions } from '../src';
export function genPath(path: string) {
return `/api/v${DefaultRestOptions.version}${path}`;
export function genPath(path: `/${string}`) {
return `/api/v${DefaultRestOptions.version}${path}` as const;
}
export function jsonHeaders(headers: Record<string, string> = {}) {