public function __construct($options = [])
{
$default_options = ['headers' => [], 'parameters' => [], 'curl_options' => [], 'user_agent' => "PHP RestClient/0.1.5", 'base_url' => NULL, 'format' => NULL, 'format_regex' => "/(\\w+)\\/(\\w+)(;[.+])?/", 'decoders' => ['json' => 'json_decode', 'php' => 'unserialize'], 'username' => NULL, 'password' => NULL];
$this->options = array_merge($default_options, $options);
if (array_key_exists('decoders', $options)) {
$this->options['decoders'] = array_merge($default_options['decoders'], $options['decoders']);
}
}