Use an httpsender script this way with js (sorry but I feel more comfortable with JS than zest)
// compatibility between nashorn and rhino script
if (typeof println !== 'undefined' && typeof println !== 'function' ) {
var print = function (str) { println(str); }
}else{
var println = function (str) { print(str); }
}
function sendingRequest(msg, initiator, helper) {
msg.getRequestHeader().setHeader("myHeaderName","myHeaderValue");
println(msg.getRequestHeader().toString());
}
function responseReceived(msg, initiator, helper) {
// Debugging can be done using println like this
println('responseReceived called for url=' + msg.getRequestHeader().getURI().toString())
}
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.6.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Cookie: Drupal.toolbar.collapsed=0; has_js=1
Connection: keep-alive
Cache-Control: max-age=0
Host: 172.17.0.3
Content-Length: 0
myHeaderName: myHeaderValue