B2G/gecko/services/common/rest.js
/**
   * Object containing HTTP headers (keyed as lower case)
   */
Object containing HTTP headers (keyed as lower case)
Object containing HTTP headers ( keyed as lower case )
get headers() {
    let headers = {};
    try {
      this._log.trace("Processing response headers.");
      let channel = this.request.channel.QueryInterface(Ci.nsIHttpChannel);
      channel.visitResponseHeaders(function (header, value) {
        headers[header.toLowerCase()] = value;
      });
    } catch (ex) {
      this._log.debug("Caught exception processing response headers:" +
                      CommonUtils.exceptionStr(ex));
      return null;
    }
    delete this.headers;
    return this.headers = headers;
  }
get headers ( ) { let headers = { } ; try { this . _log . trace ( "Processing response headers." ) ; let channel = this . request . channel . QueryInterface ( Ci . nsIHttpChannel ) ; channel . visitResponseHeaders ( function ( header , value ) { headers [ header . toLowerCase ( ) ] = value ; } ) ; } catch ( ex ) { this . _log . debug ( "Caught exception processing response headers:" + CommonUtils . exceptionStr ( ex ) ) ; return null ; } delete this . headers ; return this . headers = headers ; }
Object containing HTTP headers (keyed as lower case)
Object containing HTTP headers ( keyed as lower case )