$51 GRAYBYTE WORDPRESS FILE MANAGER $66

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

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

HOME
Current File : /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 [ WRITEABLE ]


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

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF