change code in some item
This commit is contained in:
@@ -16,8 +16,6 @@ class GetErrorRateService
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->url = config('fms_web_services.Error_Rate.url');
|
||||
$this->password = config('fms_web_services.Error_Rate.password');
|
||||
$this->username = config('fms_web_services.Error_Rate.username');
|
||||
$this->channelName = 'fms_error_rate';
|
||||
}
|
||||
@@ -49,22 +47,10 @@ class GetErrorRateService
|
||||
|
||||
public function sendRequest(): array
|
||||
{
|
||||
$inputData = $this->makeInputParameters();
|
||||
|
||||
return Http::withBody($inputData)
|
||||
return Http::withHeaders(['Content-Type' => 'application/json'])
|
||||
->throw()
|
||||
->withoutVerifying()
|
||||
->post($this->url)
|
||||
->post($this->url, $this->inputParameters)
|
||||
->json();
|
||||
}
|
||||
|
||||
private function makeInputParameters(): string
|
||||
{
|
||||
$inputData = $this->inputParameters + array(
|
||||
"username" => $this->username,
|
||||
"password" => $this->password,
|
||||
);
|
||||
|
||||
return json_encode($inputData);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user