ariya/phantomjs — pull request #11300 by Vitallium (2013-05-09 08:05:28+00:00)
Title: Network request header manipulation

Issue: https://github.com/ariya/phantomjs/issues/11299

User should be able to manipulate HTTP headers per each network request, not only using global setting page.customHeaders.

Like this:

page.onResourceRequested = function(requestData, request) {
// Passing `null` as the second argument will remove the HTTP header
request.setHeader("CustomHeader", "ChangedCustomValue");
};