code: function (options) {
          // Nothing to do
          if (!options) { return; }
  
          // The existing url is updated.
          _.has(options, 'url') && this.url.update(options.url);
  
          // The existing list of headers must be cleared before adding the given headers to it.
          options.header && this.headers.repopulate(options.header);
  
          // Only update the method if one is provided.
          _.has(options, 'method') && (this.method = _.isNil(options.method) ?
              DEFAULT_REQ_METHOD : String(options.method).toUpperCase());
  
          // The rest of the properties are not assumed to exist so we merge in the defined ones.
          _.mergeDefined(this, /** @lends Request.prototype */ {
              /**
               * @type {RequestBody|undefined}
               */
              body: _.createDefined(options, 'body', RequestBody),
  
              // auth is a special case, empty RequestAuth should not be created for falsy values
              // to allow inheritance from parent
              /**
               * @type {RequestAuth}
               */
              auth: options.auth ? new RequestAuth(options.auth) : undefined,
  
              /**
               * @type {ProxyConfig}
               */
              proxy: options.proxy && new ProxyConfig(options.proxy),
  
              /**
               * @type {Certificate|undefined}
               */
              certificate: options.certificate && new Certificate(options.certificate)
          });
      }
docs: Updates the different properties of the request.
  
  @param {Request~definition} options