Fix SSL request
This commit is contained in:
@@ -24,7 +24,7 @@ class XenforoApiService {
|
||||
*/
|
||||
private function get(string $endpoint, ?int $customUserId = null ): mixed
|
||||
{
|
||||
$response = Http::timeout(30)->withHeaders([
|
||||
$response = Http::timeout(30)->withOptions(['verify' => false])->withHeaders([
|
||||
'XF-Api-Key' => $this->apiKey,
|
||||
'XF-Api-User' => $customUserId ?? $this->superUserId,
|
||||
])->get("{$this->apiUrl}/{$endpoint}");
|
||||
@@ -39,7 +39,7 @@ class XenforoApiService {
|
||||
|
||||
private function post(string $endpoint, ?int $customUserId = null, array $data = [] ): mixed
|
||||
{
|
||||
$response = Http::timeout(30)->withHeaders([
|
||||
$response = Http::timeout(30)->withOptions(['verify' => false])->withHeaders([
|
||||
'XF-Api-Key' => $this->apiKey,
|
||||
'XF-Api-User' => $customUserId ?? $this->superUserId,
|
||||
])->post("{$this->apiUrl}/{$endpoint}", $data);
|
||||
@@ -54,7 +54,7 @@ class XenforoApiService {
|
||||
|
||||
private function delete(string $endpoint, ?int $customUserId = null, array $data = [] ): mixed
|
||||
{
|
||||
$response = Http::timeout(30)->withHeaders([
|
||||
$response = Http::timeout(30)->withOptions(['verify' => false])->withHeaders([
|
||||
'XF-Api-Key' => $this->apiKey,
|
||||
'XF-Api-User' => $customUserId ?? $this->superUserId,
|
||||
])->delete("{$this->apiUrl}/{$endpoint}", $data);
|
||||
|
||||
Reference in New Issue
Block a user