Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
rbartley
Valued Contributor

Adding Mime Type using qlik.callRepository in mashup

Hi everyone,

I am new to using the Repository API and am trying to get rid of some annoying error messages associated with the fonts of type woff2 which come with Bootstrap.  Currently, I receive an error in my mashup:

woff2 error.png

I have been advised that to remove these, I would need to register the woff2 MIME type, so I have added a couple of lines to my script:

qlik.callRepository('/qrs/extension/schema','GET').success(function(reply) {

alert(JSON.stringify(reply));

});

qlik.callRepository('/qrs/mimetype','POST',{"mime":"font/woff2", "additionalHeaders": "header1","binary": false }).success(function(reply) {

alert(JSON.stringify(reply));

});

While the first (GET) command works as expected (this was just a test to make sure that I could interact with the Repository API), the second returns an error:

callRepository error.PNG

Does anyone have any ideas how to resolve this?

3 Replies
sandeep_roy
Contributor II

Re: Adding Mime Type using qlik.callRepository in mashup

Hi Richard,

You have to check whether from your machine: Allow Control- Allow Origin: *  .......You install the chrome extension for the same.. Try after wards...

rbartley
Valued Contributor

Re: Adding Mime Type using qlik.callRepository in mashup

Sorry Sandeep, I don't understand your comment.  Are you saying that everyone who views the mashup would have to install a Chrome extension?  If so, this is not a viable option.

sandeep_roy
Contributor II

Re: Adding Mime Type using qlik.callRepository in mashup

Hello Richard,

That's not viable option. I do agree. Just said to have check that option. As per your screenshot some problem  in POST repository call which requires proper authentication.