Go
Go
Example: Http.GetRequestHeader method
Demonstrates theGetRequestHeader method.
Chilkat Go Downloads
success := false
http := chilkat.NewHttp()
hdr1 := "X-CSRF-Token"
hdr2 := "X-Example"
http.SetRequestHeader(hdr1,"Fetch")
http.SetRequestHeader(hdr2,"123ABC")
fmt.Println(hdr1, ": ", *http.GetRequestHeader(hdr1))
fmt.Println(hdr2, ": ", *http.GetRequestHeader(hdr2))
// Output:
// X-CSRF-Token: Fetch
// X-Example: 123ABC
http.DisposeHttp()