How to use the ember-fetch/utils/serialize-query-params function in ember-fetch

To help you get started, we’ve selected a few ember-fetch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github travis-ci / travis-web / app / services / ajax.js View on Github external
setupUrl(requestUrl, method, options) {
    const { host = '', data } = options;
    const baseUrl = `${host}${requestUrl}`;

    if (data && this.isRetrieve(method)) {
      const params = serializeQueryParams(data);
      const delimeter = baseUrl.indexOf('?') === -1 ? '?' : '&';
      return `${baseUrl}${delimeter}${params}`;
    }

    return baseUrl;
  },

ember-fetch

HTML5 Fetch polyfill (as an ember-addon)

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis