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

Function requestFetch

cli/src/http/client.ts:319–332  ·  view source on GitHub ↗
(req: Request, init?: RequestInit)

Source from the content-addressed store, hash-verified

317 // Returns the raw Response for every status; the oRPC fetch wrapper (orpc.ts) inspects the
318 // status and raises classifyResponse for non-2xx, so error mapping stays in one place.
319 const requestFetch = (req: Request, init?: RequestInit): Promise<Response> => {
320 const method = req.method.toUpperCase() as HttpMethod
321 const resolved: ResolvedOptions = {
322 method,
323 headers: req.headers,
324 body: undefined,
325 timeoutMs: state.defaultTimeoutMs,
326 retryAttempts: state.defaultRetryAttempts,
327 throwOnError: false,
328 retryOnRateLimit: false,
329 }
330 const userSignal = init?.signal ?? req.signal
331 return execute(state, req, resolved, state.defaultTimeoutMs, userSignal)
332 }
333
334 const extend = (overrides: Partial<ClientOptions>): HttpClient => createHttpClient({ ...state.originalOptions, ...overrides })
335

Callers

nothing calls this directly

Calls 1

executeFunction · 0.85

Tested by

no test coverage detected