MCPcopy Index your code
hub / github.com/langgenius/dify / res

Function res

cli/src/http/error-mapper.test.ts:6–11  ·  view source on GitHub ↗
(status: number, body: unknown)

Source from the content-addressed store, hash-verified

4import { classifyResponse } from './error-mapper'
5
6function res(status: number, body: unknown): Response {
7 return new Response(typeof body === 'string' ? body : JSON.stringify(body), {
8 status,
9 headers: { 'content-type': 'application/json' },
10 })
11}
12
13const req = new Request('https://dify.test/openapi/v1/apps')
14

Callers 8

startStubServerFunction · 0.85
stopFunction · 0.85
spawn_backgroundFunction · 0.85
login.e2e.tsFile · 0.85
classifiedFunction · 0.85
startStubFunction · 0.85
startStubFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected