MCPcopy
hub / github.com/ecyrbe/zodios / patch

Method patch

src/zodios.ts:368–384  ·  view source on GitHub ↗

* make a patch 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, "patch", Path>>>,
    ...[config]: RequiredKeys<TConfig> extends never
      ? [config?: ReadonlyDeep<TConfig>]
      : [config: ReadonlyDeep<TConfig>]
  )

Source from the content-addressed store, hash-verified

366 * @returns response validated with zod schema provided in the api description
367 */
368 async patch<
369 Path extends ZodiosPathsByMethod<Api, "patch">,
370 TConfig extends ZodiosRequestOptionsByPath<Api, "patch", Path>
371 >(
372 path: Path,
373 data: ReadonlyDeep<UndefinedIfNever<ZodiosBodyByPath<Api, "patch", Path>>>,
374 ...[config]: RequiredKeys<TConfig> extends never
375 ? [config?: ReadonlyDeep<TConfig>]
376 : [config: ReadonlyDeep<TConfig>]
377 ): Promise<ZodiosResponseByPath<Api, "patch", Path>> {
378 return this.request({
379 ...config,
380 method: "patch",
381 url: path,
382 data,
383 } as any);
384 }
385
386 /**
387 * make a delete request to the api

Callers 2

api.test.tsFile · 0.80
zodios.test.tsFile · 0.80

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected