Node.js
Node.js
Example: Http.GetRequestHeader method
Demonstrates theGetRequestHeader method.
Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
var http = new chilkat.Http();
var hdr1 = "X-CSRF-Token";
var hdr2 = "X-Example";
http.SetRequestHeader(hdr1,"Fetch");
http.SetRequestHeader(hdr2,"123ABC");
console.log(hdr1 + ": " + http.GetRequestHeader(hdr1));
console.log(hdr2 + ": " + http.GetRequestHeader(hdr2));
// Output:
// X-CSRF-Token: Fetch
// X-Example: 123ABC
}
chilkatExample();