Data Plugin - Generic JSON

I’m trying to make a Generic JSON to obtain some users from a REST API Endpoint. This Endpoint requires the apikey (which is stored in the dataSlot called ds_Apikey), When trying to send the Apikey by creating a custom HTTP headers like the following, the error return is The operation couldn’t be completed. (NSURLErrorDomain error -1012.).
{“apikey”:this.dataSlots[‘ds_Apikey’]}

if I manually insert the Apikey as as follows, there is no issue with it
{“apikey”:“WRfsieryw432jsi34ufijaieur”}

Anyone has idea on how to obtain the data from dataSlots and inserting into the custom header?

Hi,unfortunately the generic JSON plugin’s custom header setting does not support syntax for injecting Data slot values. You could probably tweak the plugin code so that it can handle the data slot values as well.

Hi, If you create a new plugin you can see how studio works with dataslot and plug-ins…

I’m about to head down this custom plugin path for this same reason - I need custom HTTP headers. Before doing so, I thought I’d check in to see if anyone else has made progress.

My specific scenario/need is to use the Azure/Cosmos Rest API. This requires a number of HTTP header values. Some of these are static and I can either hard code them, or preferably pull them from a data slot. Others are dynamic and need to be generated each time before the HTTP request.

There’s probably a lot more that could be done to create a robust Cosmos plugin, but I plan on starting with something simple. Will probably hard code the static values, and script/code the dynamic values.

I’m going to start with the Generic JSON plugin as a template. Has anyone extended this for custom headers, either static or dynamic?

Thanks!!