public function request($path, $arg_options = [])
{
$default_options = ['method' => 'get', 'absolute_url' => false];
$options = array_merge($default_options, $arg_options);
$url = $path;
if (strpos($path, 'http') !== 0 && !$options['absolute_url']) {
$url = sprintf('%s://%s:%s/api/%s', $this->getConfig()->get('protocol'), $this->getConfig()->get('host'), $this->getConfig()->get('port'), $path);
}
$response = $this->send($url, $options['method'], $options);
$data = ['data' => json_decode($response->getBody()->getContents()), 'headers' => $response->getHeaders(), 'status_code' => $response->getStatusCode()];
return $data;
}