0

[gnome-sehll-extension]

I need read other web pages and parse the obtained JSON files.

The office example is:

$.ajax({
    url: 'http://api.xxx/yyyy',
    type: 'get',
    dataType: 'jsonp',
    data: {
        q: query,
        appid: appid,
        salt: salt,
        from: from,
        to: to,
        sign: sign
    },
    success: function (data) {
        console.log(data);
    }
});

I have get the result data use POST manaully.

now how can I use ajax mothed? or use some library to do it? or call curl command to get the result?

eexpress
  • 386
  • 1
  • 14
  • I searched for a long time and found that GJS may have more restrictions. For example, the local files in the directory cannot be listed, and the network cannot be accessed directly. So I did this with the external command curl. – eexpress Jan 06 '22 at 12:26
  • `gi.Soup` can use `get` to access the network. But I haven't studied whether `post` can do it. thank JustPerfection. – eexpress Jan 06 '22 at 13:22

0 Answers0