Ruby
Ruby
Example: Http.GetRequestHeader method
Demonstrates theGetRequestHeader method.
Chilkat Ruby Downloads
require 'chilkat'
success = false
http = Chilkat::CkHttp.new()
hdr1 = "X-CSRF-Token"
hdr2 = "X-Example"
http.SetRequestHeader(hdr1,"Fetch")
http.SetRequestHeader(hdr2,"123ABC")
print hdr1 + ": " + http.getRequestHeader(hdr1) + "\n";
print hdr2 + ": " + http.getRequestHeader(hdr2) + "\n";
# Output:
# X-CSRF-Token: Fetch
# X-Example: 123ABC