MCPcopy Create free account
hub / github.com/langgenius/dify / typedCall

Function typedCall

cli/src/http/client.ts:279–284  ·  view source on GitHub ↗
(method: HttpMethod, path: string, callOpts?: RequestOptions)

Source from the content-addressed store, hash-verified

277 const state = compileState(opts)
278
279 const typedCall = async <T>(method: HttpMethod, path: string, callOpts?: RequestOptions): Promise<T> => {
280 const finalOpts: RequestOptions = { ...callOpts, method }
281 const built = buildRequest(state, path, finalOpts, true)
282 const res = await execute(state, built.request, built.resolved, built.effectiveTimeoutMs, built.userSignal)
283 return parseJsonBody<T>(res)
284 }
285
286 const rawFetch = (path: string, callOpts?: RequestOptions): Promise<Response> => {
287 const finalOpts: RequestOptions = { ...callOpts, method: callOpts?.method ?? 'GET' }

Callers 1

createHttpClientFunction · 0.85

Calls 3

buildRequestFunction · 0.85
executeFunction · 0.85
parseJsonBodyFunction · 0.85

Tested by

no test coverage detected