update rm deadcode
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Services\vCenter;
|
||||
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use App\Support\TlsHttpClientFactory;
|
||||
use App\Http\Facade\SignRSA;
|
||||
use App\Models\Vcenter;
|
||||
use Exception;
|
||||
@@ -23,7 +24,7 @@ class Client
|
||||
$this->username = $vcenterModel->user;
|
||||
$this->password = SignRSA::DecryptFunc($vcenterModel->password);
|
||||
|
||||
$response = Http::withoutVerifying()
|
||||
$response = TlsHttpClientFactory::vCenter()
|
||||
->withBasicAuth($this->username, $this->password)
|
||||
->post("https://{$this->apiUri}/rest/com/vmware/cis/session", []);
|
||||
|
||||
@@ -48,7 +49,7 @@ class Client
|
||||
|
||||
public function checkApiExits(): bool
|
||||
{
|
||||
$response = Http::withoutVerifying()
|
||||
$response = TlsHttpClientFactory::vCenter()
|
||||
->withHeaders([
|
||||
'vmware-api-session-id' => $this->token
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user