* make a post request to the api * @param path - the path to api endpoint * @param data - the data to send * @param config - the config to setup axios options and parameters * @returns response validated with zod schema provided in the api description
(
path: Path,
data: ReadonlyDeep<UndefinedIfNever<ZodiosBodyByPath<Api, "post", Path>>>,
...[config]: RequiredKeys<TConfig> extends never
? [config?: ReadonlyDeep<TConfig>]
: [config: ReadonlyDeep<TConfig>]
)
| 316 | * @returns response validated with zod schema provided in the api description |
| 317 | */ |
| 318 | async post< |
| 319 | Path extends ZodiosPathsByMethod<Api, "post">, |
| 320 | TConfig extends ZodiosRequestOptionsByPath<Api, "post", Path> |
| 321 | >( |
| 322 | path: Path, |
| 323 | data: ReadonlyDeep<UndefinedIfNever<ZodiosBodyByPath<Api, "post", Path>>>, |
| 324 | ...[config]: RequiredKeys<TConfig> extends never |
| 325 | ? [config?: ReadonlyDeep<TConfig>] |
| 326 | : [config: ReadonlyDeep<TConfig>] |
| 327 | ): Promise<ZodiosResponseByPath<Api, "post", Path>> { |
| 328 | return this.request({ |
| 329 | ...config, |
| 330 | method: "post", |
| 331 | url: path, |
| 332 | data, |
| 333 | } as any); |
| 334 | } |
| 335 | |
| 336 | /** |
| 337 | * make a put request to the api |
no test coverage detected