jparis / qrs-interact

Inactive - QRS Interact is a simple javascript library that allows users to send queries to the Qlik Sense Repository Service.
GNU General Public License v3.0
10 stars 7 forks source link

Multiple export app #76

Closed zhiv1987 closed 3 years ago

zhiv1987 commented 3 years ago

When call app export more than once get the encoded result: Because gzip header is set in Get(downloadPath)

instance.Post(
    '/app/bd333f5b-752c-4e73-94c1-50d9782a279c/export/bd332f6b-752c-4e73-94c1-50d9782a279c', {},
    'json'
).then(function(result) {
    console.log(result.body);
    downloadPath = result.body["downloadPath"];
}).then(function() {
    instance.Get(downloadPath)                  //set gzip header
        .then(function(result) {
            console.log(result.statusCode);
            console.log(result.body);
        })
        .catch(function(error) {
            console.log(error);
        });
}).then(function(result) {
return instance.Post(
    '/app/c0cfc639-c083-4610-928f-687df94567c9/export/c0cfc639-c083-4610-928f-687df94567c9', {},
    'json')
}).then(function(result) {
    console.log(result.body);               //get encoding result
    downloadPath = result.body["downloadPath"];
});
jparis commented 3 years ago

Hmm, interesting, thought that was scoped to the function but I guess it's not. I'll do some digging and report back.

Thanks!

jparis commented 3 years ago

yep. it's a bug. will fix.