setted server url as a class property and consumes it in every function

This commit is contained in:
Eduardo Bacarin 2025-07-04 16:57:17 -03:00
parent 4cf3ecc867
commit a9abbfe932
2 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@ use phpseclib3\Crypt\PublicKeyLoader;
class Kore
{
private $url = 'https://httpbin.org';
public $url = 'https://httpbin.org';
public $privateKey;
public $drone;
public function __construct($privateKey, $drone) {

View file

@ -32,7 +32,7 @@ class Pix extends Kore
}
return curlRequest(
'https://httpbin.org/post',
$this->url . '/post',
'POST',
[],
[
@ -69,7 +69,7 @@ class Pix extends Kore
}
return curlRequest(
'https://httpbin.org/post',
$this->url . '/post',
'POST',
[],
[
@ -114,7 +114,7 @@ class Pix extends Kore
}
return curlRequest(
'https://httpbin.org/post',
$this->url . '/post',
'POST',
[],
[
@ -158,7 +158,7 @@ class Pix extends Kore
}
return curlRequest(
'https://httpbin.org/post',
$this->url . '/post',
'POST',
[],
[