MCPcopy
hub / github.com/mswjs/msw / constructor

Method constructor

src/core/HttpResponse.ts:49–53  ·  view source on GitHub ↗
(body?: NoInfer<BodyType> | null, init?: HttpResponseInit)

Source from the content-addressed store, hash-verified

47 readonly [bodyType]: BodyType = null as any
48
49 constructor(body?: NoInfer<BodyType> | null, init?: HttpResponseInit) {
50 const responseInit = normalizeResponseInit(init)
51 super(body as BodyInit, responseInit)
52 decorateResponse(this, responseInit)
53 }
54
55 static error(): HttpResponse<any> {
56 return super.error() as HttpResponse<any>

Callers

nothing calls this directly

Calls 2

normalizeResponseInitFunction · 0.90
decorateResponseFunction · 0.90

Tested by

no test coverage detected