Include HTTP headers in output in Zotero.HTTP.request() debug mode

This commit is contained in:
Dan Stillman 2015-03-22 02:44:24 -04:00
parent 32a4604481
commit b437826bd0

View file

@ -158,6 +158,9 @@ Zotero.HTTP = new function() {
if (options && options.body && !headers["Content-Type"]) {
headers["Content-Type"] = "application/x-www-form-urlencoded";
}
if (options.debug) {
Zotero.debug(headers);
}
for (var header in headers) {
xmlhttp.setRequestHeader(header, headers[header]);
}