PowerShell
PowerShell
Example: Http.GetRequestHeader method
Demonstrates theGetRequestHeader method.
Chilkat PowerShell Downloads
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$success = $false
$http = New-Object Chilkat.Http
$hdr1 = "X-CSRF-Token"
$hdr2 = "X-Example"
$http.SetRequestHeader($hdr1,"Fetch")
$http.SetRequestHeader($hdr2,"123ABC")
$($hdr1 + ": " + $http.GetRequestHeader($hdr1))
$($hdr2 + ": " + $http.GetRequestHeader($hdr2))
# Output:
# X-CSRF-Token: Fetch
# X-Example: 123ABC