MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / Response

Function Response

scripts/libs/fetch.js:246–259  ·  view source on GitHub ↗
(bodyInit, options)

Source from the content-addressed store, hash-verified

244 Body.call(Request.prototype)
245
246 function Response(bodyInit, options) {
247 if (!options) {
248 options = {}
249 }
250
251 this._initBody(bodyInit)
252 this.type = 'default'
253 this.url = null
254 this.status = options.status
255 this.ok = this.status >= 200 && this.status < 300
256 this.statusText = options.statusText
257 this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)
258 this.url = options.url || ''
259 }
260
261 Body.call(Response.prototype)
262

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected