code: function(callback, method, uri, queryParams, data,
                                opts) {
          if (opts === undefined || opts === null) {
              opts = {};
          } else if (isFinite(opts)) {
              // opts used to be localTimeoutMs
              opts = {
                  localTimeoutMs: opts,
              };
          }
  
          return this._request(
              callback, method, uri, queryParams, data, opts,
          );
      }
docs: Perform a request to an arbitrary URL.
  @param {Function} callback Optional. The callback to invoke on
  success/failure. See the promise return values for more information.
  @param {string} method The HTTP method e.g. "GET".
  @param {string} uri The HTTP URI
  
  @param {Object=} queryParams A dict of query params (these will NOT be
  urlencoded). If unspecified, there will be no query params.
  
  @param {Object} data The HTTP JSON body.
  
  @param {Object=} opts additional options
  
  @param {Number=} opts.localTimeoutMs The maximum amount of time to wait before
  timing out the request. If not specified, there is no timeout.
  
  @param {sting=} opts.prefix The full prefix to use e.g.
  "/_matrix/client/v2_alpha". If not specified, uses this.opts.prefix.
  
  @param {Object=} opts.headers map of additional request headers
  
  @return {module:client.Promise} Resolves to <code>{data: {Object},
  headers: {Object}, code: {Number}}</code>.
  If <code>onlyData</code> is set, this will resolve to the <code>data</code>
  object only.
  @return {module:http-api.MatrixError} Rejects with an error if a problem
  occurred. This includes network problems and Matrix-specific error JSON.