Verified Commit 10ba077c authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: Feat(webservice) - adds exec methods

Allowing generic call to exec curl
parent 1a9cb56a
1 merge request!55Resolve "[Integrator] - Rest library - update to allow easy trigger of archiving objects"
Pipeline #32389 failed with stages
in 51 seconds
Showing with 17 additions and 0 deletions
+17 -0
...@@ -198,5 +198,22 @@ class WebServiceCall ...@@ -198,5 +198,22 @@ class WebServiceCall
curl_close($this->ch); curl_close($this->ch);
return $response; return $response;
} }
/**
* @return array
* @throws Exception
*/
public function execute(): array
{
$this->setCurlSettings();
$response = curl_exec($this->ch);
$this->handleCurlError($this->ch);
$decoded = json_decode($response, true);
curl_close($this->ch);
return $decoded;
}
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment