sub run_api_call { #start with connecting to Onelogin and getting the profiles $client->getUseragent()->proxy(['https'], 'http://proxy.com:8080'); $client->setHost('my.onlogin.com'); $client->setCert("$cert"); $client->setKey("$certkey"); $client->setCa("$certca1"); $client->setCa("$certca"); $client->setTimeout(10); $client->addHeader('Authorization',"SSWS $value"); $client->addHeader('Accept','application/json'); $client->addHeader('Content-type','application/json'); $client->GET($_[0]); }