* make a get request to the api * @param path - the path to api endpoint * @param config - the config to setup axios options and parameters * @returns response validated with zod schema provided in the api description
(
path: Path,
...[config]: RequiredKeys<TConfig> extends never
? [config?: ReadonlyDeep<TConfig>]
: [config: ReadonlyDeep<TConfig>]
)
| 293 | * @returns response validated with zod schema provided in the api description |
| 294 | */ |
| 295 | async get< |
| 296 | Path extends ZodiosPathsByMethod<Api, "get">, |
| 297 | TConfig extends ZodiosRequestOptionsByPath<Api, "get", Path> |
| 298 | >( |
| 299 | path: Path, |
| 300 | ...[config]: RequiredKeys<TConfig> extends never |
| 301 | ? [config?: ReadonlyDeep<TConfig>] |
| 302 | : [config: ReadonlyDeep<TConfig>] |
| 303 | ): Promise<ZodiosResponseByPath<Api, "get", Path>> { |
| 304 | return this.request({ |
| 305 | ...config, |
| 306 | method: "get", |
| 307 | url: path, |
| 308 | } as any); |
| 309 | } |
| 310 | |
| 311 | /** |
| 312 | * make a post request to the api |
no test coverage detected