$88 GRAYBYTE WORDPRESS FILE MANAGER $97

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/usr/lib/node_modules/npm/node_modules/node-fetch-npm/src/

HOME
Current File : /usr/lib/node_modules/npm/node_modules/node-fetch-npm/src//response.js
'use strict'

/**
 * response.js
 *
 * Response class provides content decoding
 */

const STATUS_CODES = require('http').STATUS_CODES
const Headers = require('./headers.js')
const Body = require('./body.js')
const clone = Body.clone

/**
 * Response class
 *
 * @param   Stream  body  Readable stream
 * @param   Object  opts  Response options
 * @return  Void
 */
class Response {
  constructor (body, opts) {
    if (!opts) opts = {}
    Body.call(this, body, opts)

    this.url = opts.url
    this.status = opts.status || 200
    this.statusText = opts.statusText || STATUS_CODES[this.status]

    this.headers = new Headers(opts.headers)

    Object.defineProperty(this, Symbol.toStringTag, {
      value: 'Response',
      writable: false,
      enumerable: false,
      configurable: true
    })
  }

  /**
   * Convenience property representing if the request ended normally
   */
  get ok () {
    return this.status >= 200 && this.status < 300
  }

  /**
   * Clone this response
   *
   * @return  Response
   */
  clone () {
    return new Response(clone(this), {
      url: this.url,
      status: this.status,
      statusText: this.statusText,
      headers: this.headers,
      ok: this.ok
    })
  }
}

Body.mixIn(Response.prototype)

Object.defineProperty(Response.prototype, Symbol.toStringTag, {
  value: 'ResponsePrototype',
  writable: false,
  enumerable: false,
  configurable: true
})
module.exports = Response


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.36 PM
root / root
0755
blob.js
2.753 KB
10 Mar 2021 2.36 PM
root / root
0644
body.js
9.551 KB
10 Mar 2021 2.36 PM
root / root
0644
common.js
3.065 KB
10 Mar 2021 2.36 PM
root / root
0644
fetch-error.js
0.865 KB
10 Mar 2021 2.36 PM
root / root
0644
headers.js
6.412 KB
10 Mar 2021 2.36 PM
root / root
0644
index.js
6.748 KB
10 Mar 2021 2.36 PM
root / root
0644
request.js
4.474 KB
10 Mar 2021 2.36 PM
root / root
0644
response.js
1.403 KB
10 Mar 2021 2.36 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF