Send the X-PJAX header with request (#80)

Make it more compatible with the jQuery PJAX and lets the server choose to optimize the response. Sending the list of selectors would be nice, too.
This commit was merged in pull request #80.
This commit is contained in:
Bradley B Smith authored and Maxime Thirouin committed 2017-12-19 13:56:30 +01:00
1 parent 75eddfcab6
commit 1e40a0d70b
1 file changed
+1
+1
View File
@@ -22,6 +22,7 @@ module.exports = function(location, options, callback) {
request.open(requestMethod.toUpperCase(), location, true)
request.setRequestHeader("X-Requested-With", "XMLHttpRequest")
request.setRequestHeader("X-PJAX", "true")
// Add the request payload if available
if (options.requestPayloadString != undefined && options.requestPayloadString != "") {