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

Method get

src/zodios.ts:295–309  ·  view source on GitHub ↗

* 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>]
  )

Source from the content-addressed store, hash-verified

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

Callers 8

api.test.tsFile · 0.80
zodios.test.tsFile · 0.80
getAnyEndpointPluginsMethod · 0.80
findEnpointPluginsMethod · 0.80
ejectMethod · 0.80
bootstrapFunction · 0.80
example.tsFile · 0.80

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected