[SOLVED] i.url.indexOf is not a function for app.request.get

Hi, I don’t understand why my request doesn’t work.

    var url = urlServer + 'company/';
    var key = localStorage.getItem('loginKey');

    app.request.get({
              url: url,
              data: {keys: key},
              success: function (data,status,xhr) {

                var d = JSON.parse(data);
                //...code..

              }

 });//request

I try to write the url manually but the error still the same.
this is the error on the console.

framework7.js:3841 Uncaught TypeError: i.url.indexOf is not a function
at Request (framework7.js:3841)
at RequestShortcut (framework7.js:4087)
at Function.Request.get (framework7.js:4093)
at getAziende (inc.js:94)
at e.pageInit (my-app.js:289)
at HTMLDivElement.l (framework7.js:1045)
at Dom7.trigger (framework7.js:1167)
at e.pageCallback (framework7.js:8636)
at e.forward (framework7.js:6098)
at framework7.js:6305

Thank you advance for your help

1 Like

What’s in line number 3841 (framework7.js)?

// Parameters Prefix
var paramsPrefix = options.url.indexOf('?') >= 0 ? '&' : '?';

Check signature: https://framework7.io/docs/request.html#get Params, not object passed

2 Likes

thank you for reply, I already read the docs, but I still not understand the mistake

In docs:

app.request.get(’/same-url’, {data: data}, function ()…’);

In your code:

app.request.get({});

2 Likes