Include HTTP headers in output in Zotero.HTTP.request() debug mode
This commit is contained in:
parent
32a4604481
commit
b437826bd0
|
@ -158,6 +158,9 @@ Zotero.HTTP = new function() {
|
||||||
if (options && options.body && !headers["Content-Type"]) {
|
if (options && options.body && !headers["Content-Type"]) {
|
||||||
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
||||||
}
|
}
|
||||||
|
if (options.debug) {
|
||||||
|
Zotero.debug(headers);
|
||||||
|
}
|
||||||
for (var header in headers) {
|
for (var header in headers) {
|
||||||
xmlhttp.setRequestHeader(header, headers[header]);
|
xmlhttp.setRequestHeader(header, headers[header]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user