Make HTTP headers sent in Api::http editable

Added public variable $http_headers to Api.php and changed Api::http to use the headers from the variable.