code: function encodeQueryAsString(query = {}) {
    const params = Object.keys(query).map((name) =>
      [encodeURIComponent(name), encodeURIComponent(query[name])].join('=')
    );
    return params.length ? `?${params.join('&')}` : '';
  }
docs: ----------------------------------------------------------------------------