1

I'm fairly new to sapui5 and I'm trying to use the Hearthstone API in order to show a list of cards.

I've registered in the page and I've obtained the X-Mashape-Key which I'm using to try to connect to the API.

For this, I've created a destination with the following information:

enter image description here

Besides this, I've created a view and its corresponding controller with the onInit function, with the following code:

enter image description here

Being the sUrl: /hsApi/cards and oHeaders:

var oHeaders = {            
  "X-Mashape-Key": "key"
};

The result that I obtain is the following one:

enter image description here

Request is failing stating that I'm not authorized to request the information, even though that doing the same request in PostMan I'm obtaining the information.

Most likely, this is caused by something really obvious but I'm not able to see it.

Marc
  • 6,051
  • 5
  • 26
  • 56
Xnail
  • 21
  • 4

1 Answers1

0

Could you try adding the following property to your destination? I am not sure what this property does exactly, but maybe you need it to allow this destination to be used in your WebIDE. Also try changing your "True" and "TRUE" to lowercase "true".

enter image description here

But I think you don't need any "Additional property" at all. Can't hurt to try it without them aswell.

Please keep in mind that you need to restart your WebIDE everytime you change something in your destinations as those are loaded statically every time the WebIDE loaded.

luuksen
  • 1,357
  • 2
  • 12
  • 38