This commit is contained in:
@@ -243,6 +243,14 @@ class Hiltes
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a request to the specified URL using CURL.
|
||||
*
|
||||
* @param string $url The URL to send the request to.
|
||||
* @param mixed $param The data to send with the request. It should be an associative array.
|
||||
* @param bool $auth (Optional) Indicates whether to include authorization in the request headers. Default is false.
|
||||
* @return mixed The response from the server.
|
||||
*/
|
||||
public function sendToHiltes($url, $param, $auth = false)
|
||||
{
|
||||
$ch = curl_init($url);
|
||||
@@ -265,6 +273,12 @@ class Hiltes
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a JSON object based on the given data.
|
||||
*
|
||||
* @param mixed $data The data to be converted to JSON.
|
||||
* @return array The JSON object.
|
||||
*/
|
||||
public function createJson($data)
|
||||
{
|
||||
$arr = array(
|
||||
|
||||
Reference in New Issue
Block a user