Hey, I just built a get function that calls on a https API, but the server-department at my office wants me to use a proxy for this. Im relativily new to proxies, so my question is if anyone has an idea of how to wrap this get function in to a https proxy?
loadLibrary("cus:json3.js");
//Require temp Schema to match against city
var query = xtk.queryDef.create(
<queryDef operation="select" schema={vars.targetSchema}>
<select>
<node expr="@smartcity"/>
</select>
</queryDef>
);
var res = query.ExecuteQuery();
function getCall(){
var http = new HttpClientRequest();
http.url = "https://url..." + line.@smartcity + "...restoftheurlandkey";
http.method = "GET"; //The GET request
http.execute();
var response = http.response;
logInfo( response.body.toString());
};
for each (var line in res) {
getCall();
};
In regards, Martin!