setted server url as a class property and consumes it in every function
This commit is contained in:
parent
4cf3ecc867
commit
a9abbfe932
2 changed files with 5 additions and 5 deletions
|
@ -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) {
|
||||
|
|
|
@ -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',
|
||||
[],
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue