Chilkat2-Python
Chilkat2-Python
Example: Http.GetRequestHeader method
Demonstrates theGetRequestHeader method.
Chilkat Chilkat2-Python Downloads
import chilkat2
success = False
http = chilkat2.Http()
hdr1 = "X-CSRF-Token"
hdr2 = "X-Example"
http.SetRequestHeader(hdr1,"Fetch")
http.SetRequestHeader(hdr2,"123ABC")
print(hdr1 + ": " + http.GetRequestHeader(hdr1))
print(hdr2 + ": " + http.GetRequestHeader(hdr2))
# Output:
# X-CSRF-Token: Fetch
# X-Example: 123ABC