username = config('fms_web_services.Error_Rate.username'); $this->channelName = 'fms_error_rate'; } public function setInputParameters(array $inputs): void { $this->inputParameters = $inputs; } /** * @throws Exception */ public function run(): array { try { return $this->sendRequest(); } catch (Exception $e) { Log::channel($this->channelName) ->error(get_class($this), [ 'message' => $e->getMessage(), ] ); throw $e; } } public function sendRequest(): array { return Http::withHeaders(['Content-Type' => 'application/json']) ->throw() ->withoutVerifying() ->post($this->url, $this->inputParameters) ->json(); } }