How to set a header in wp_safe_remote_get()?

This will work

$args = array( 'headers' => array("Accept" => "application/json"));
$file = wp_safe_remote_get('http://xxxxxxxx.xxxx/xapix/xjson/xxxxx.php', $args);

headers is an array. Not a string .

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)